Skip to content

Commit

Permalink
Merge pull request #910 from PEM-Humboldt/release/2.1.0
Browse files Browse the repository at this point in the history
Release/2.1.0
  • Loading branch information
cazapatamar authored Feb 21, 2024
2 parents cb67fd3 + be4524c commit 0436444
Show file tree
Hide file tree
Showing 203 changed files with 29,418 additions and 36,508 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Dockerfile
.dockerignore
.gitignore
README.md
*.md
.git

.yarn/*
Expand Down
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ REACT_APP_PROJECT_ID=''
REACT_APP_STORAGE_BUCKET=''
REACT_APP_SENDER_ID=''
REACT_APP_APP_ID=''
REACT_APP_BACKEND_BIAB_URL='http://biab-api'
REACT_APP_GA_TRACKING_ID='G-XXXXXXXXXX'
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

24 changes: 0 additions & 24 deletions .eslintrc

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/check_format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Check format

on:
push:
branches:
- feature/*
- release/*

jobs:
check-format:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: 'package.json'
cache: pnpm
- run: pnpm install
- name: Run prettier
run: pnpm check-format
env:
CI: true
48 changes: 48 additions & 0 deletions .github/workflows/deploy_dev_stg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Deploy dev or stg

on:
workflow_call:
inputs:
app_env:
required: true
type: string
secrets:
BACKEND_KEY:
required: true
AZURE_WEBAPP_PUBLISH_PROFILE:
required: true
env:
AZURE_WEBAPP_NAME: biotablero-frontend
REACT_APP_ENVIRONMENT: ${{ inputs.app_env }}
REACT_APP_BACKEND_BIAB_URL: ${{ vars.BACKEND_BIAB_URL }}
REACT_APP_BACKEND_URL: ${{ vars.BACKEND_URL }}
REACT_APP_BACKEND_KEY: ${{ secrets.BACKEND_KEY }}
REACT_APP_GA_TRACKING_ID: ${{ vars.GA_TRACKING_ID }}

jobs:
build-and-deploy:
name: Build and Deploy
runs-on: ubuntu-latest
environment: develop

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: 'package.json'
cache: pnpm

- name: install & build
run: |
pnpm -r install
pnpm -r build-pkg
pnpm install
pnpm build
- name: Deploy to Azure WebApp
uses: azure/webapps-deploy@v2
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
16 changes: 16 additions & 0 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Deploy develop

on:
push:
branches:
- develop
workflow_dispatch:

jobs:
call-deploy:
uses: ./.github/workflows/deploy_dev_stg.yml
with:
app_env: develop
secrets:
BACKEND_KEY: ${{ secrets.BACKEND_KEY }}
AZURE_WEBAPP_PUBLISH_PROFILE: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
24 changes: 0 additions & 24 deletions .github/workflows/feature.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/release.yml

This file was deleted.

16 changes: 16 additions & 0 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Deploy staging

on:
push:
branches:
- release/*
workflow_dispatch:

jobs:
call-deploy:
uses: ./.github/workflows/deploy_dev_stg.yml
with:
app_env: staging
secrets:
BACKEND_KEY: ${{ secrets.BACKEND_KEY }}
AZURE_WEBAPP_PUBLISH_PROFILE: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v14.15
v18.15
8 changes: 8 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules/
.github
.yarn
.yarnrc.yml
.vscode/

build/
packages/*
363 changes: 0 additions & 363 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

This file was deleted.

28 changes: 0 additions & 28 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

This file was deleted.

768 changes: 0 additions & 768 deletions .yarn/releases/yarn-3.1.1.cjs

This file was deleted.

33 changes: 13 additions & 20 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,22 @@
# Build stage
FROM node:14.15 as build
LABEL maintainer="dlopez@humboldt.org.co"
USER node
FROM node:18.15-slim as build
RUN corepack enable

ENV NPM_CONFIG_LOGLEVEL warn
RUN mkdir -p /home/node/app
WORKDIR /home/node/app
RUN mkdir /app
WORKDIR /app

COPY --chown=node:node . .
WORKDIR /home/node/app/packages/cbm-dashboard
RUN yarn install
RUN yarn run build-pkg

WORKDIR /home/node/app/packages/indicators
RUN yarn install
RUN yarn run build-pkg

WORKDIR /home/node/app
RUN yarn install
RUN yarn build
COPY . .
WORKDIR /app
RUN pnpm -r install
RUN pnpm -r build-pkg
RUN pnpm install
RUN pnpm build

# Release stage
FROM node:14.15 as release
FROM node:18.15-slim as release

COPY --from=build /home/node/app/build ./build
RUN yarn global add serve@~13.0.0
COPY --from=build /app/build ./build
RUN npm install -g serve@~13.0.0
EXPOSE 5000
CMD [ "serve", "-p", "5000", "-s", "build" ]
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 Instituto de Investigación de Recursos Biológicos Alexander von Humboldt

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 0436444

Please sign in to comment.