-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implemented different API URLs for dev and prod UIs (#359)
- Loading branch information
1 parent
862cd57
commit c4aa39b
Showing
4 changed files
with
163 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Build and publish UI docker image | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
required: true | ||
type: string | ||
jobs: | ||
publish_image: | ||
runs-on: ubuntu-latest | ||
environment: ${{ inputs.environment }} | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: lowercase the repository name | ||
run: | | ||
echo "REPO=${GITHUB_REPOSITORY@L}" >> "${GITHUB_ENV}" | ||
- name: login | ||
run: | | ||
echo ${{ secrets.GITHUB_TOKEN}} | docker login --username ${{ github.actor }} --password-stdin ghcr.io | ||
- name: build | ||
run: | | ||
cd air-quality-ui | ||
docker build . -t ghcr.io/${REPO}/vairify-frontend-${{ inputs.environment }}:latest \ | ||
--build-arg VITE_AIR_QUALITY_API_URL=${{ vars.VAIRIFY_API_URL }} \ | ||
--build-arg VITE_AIR_QUALITY_UI_URL=${{ vars.VAIRIFY_UI_URL }} | ||
- name: publish | ||
run: | | ||
docker push ghcr.io/${REPO}/vairify-frontend-${{ inputs.environment }}:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
services: | ||
db: | ||
container_name: mongo | ||
image: mongo:latest | ||
restart: always | ||
ports: | ||
- 27017:27017 | ||
volumes: | ||
- database:/data/db | ||
|
||
etl-insitu: | ||
image: ghcr.io/ecmwfcode4earth/vairify/vairify-etl-insitu | ||
container_name: etl-insitu | ||
depends_on: | ||
- db | ||
environment: | ||
- MONGO_DB_URI=mongodb://mongo:27017/ | ||
- MONGO_DB_NAME=${MONGO_DB_NAME} | ||
- OPEN_AQ_API_URL=${OPEN_AQ_API_URL} | ||
- OPEN_AQ_API_KEY=${OPEN_AQ_API_KEY} | ||
- CDSAPI_URL=${CDSAPI_URL} | ||
- CDSAPI_KEY=${CDSAPI_KEY} | ||
- STORE_GRIB_FILES=${STORE_GRIB_FILES} | ||
|
||
etl-forecast: | ||
container_name: etl-forecast | ||
image: ghcr.io/ecmwfcode4earth/vairify/vairify-etl-forecast | ||
depends_on: | ||
- db | ||
environment: | ||
- MONGO_DB_URI=mongodb://mongo:27017/ | ||
- MONGO_DB_NAME=${MONGO_DB_NAME} | ||
- CDSAPI_URL=${CDSAPI_URL} | ||
- CDSAPI_KEY=${CDSAPI_KEY} | ||
- STORE_GRIB_FILES=${STORE_GRIB_FILES} | ||
volumes: | ||
- data_textures:/app/data_textures | ||
|
||
api: | ||
container_name: backend-api | ||
image: ghcr.io/ecmwfcode4earth/vairify/vairify-backend-api | ||
depends_on: | ||
- db | ||
ports: | ||
- 8000:8000 | ||
environment: | ||
- MONGO_DB_URI=mongodb://mongo:27017 | ||
- MONGO_DB_NAME=${MONGO_DB_NAME} | ||
|
||
ui: | ||
container_name: frontend-ui | ||
image: ghcr.io/ecmwfcode4earth/vairify/vairify-frontend-dev | ||
depends_on: | ||
- api | ||
ports: | ||
- 8001:80 | ||
volumes: | ||
- data_textures:/app/data_textures | ||
|
||
|
||
volumes: | ||
database: {} | ||
data_textures: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
services: | ||
db: | ||
container_name: mongo | ||
image: mongo:latest | ||
restart: always | ||
ports: | ||
- 27017:27017 | ||
volumes: | ||
- database:/data/db | ||
|
||
etl-insitu: | ||
image: ghcr.io/ecmwfcode4earth/vairify/vairify-etl-insitu | ||
container_name: etl-insitu | ||
depends_on: | ||
- db | ||
environment: | ||
- MONGO_DB_URI=mongodb://mongo:27017/ | ||
- MONGO_DB_NAME=${MONGO_DB_NAME} | ||
- OPEN_AQ_API_URL=${OPEN_AQ_API_URL} | ||
- OPEN_AQ_API_KEY=${OPEN_AQ_API_KEY} | ||
- CDSAPI_URL=${CDSAPI_URL} | ||
- CDSAPI_KEY=${CDSAPI_KEY} | ||
- STORE_GRIB_FILES=${STORE_GRIB_FILES} | ||
|
||
etl-forecast: | ||
container_name: etl-forecast | ||
image: ghcr.io/ecmwfcode4earth/vairify/vairify-etl-forecast | ||
depends_on: | ||
- db | ||
environment: | ||
- MONGO_DB_URI=mongodb://mongo:27017/ | ||
- MONGO_DB_NAME=${MONGO_DB_NAME} | ||
- CDSAPI_URL=${CDSAPI_URL} | ||
- CDSAPI_KEY=${CDSAPI_KEY} | ||
- STORE_GRIB_FILES=${STORE_GRIB_FILES} | ||
volumes: | ||
- data_textures:/app/data_textures | ||
|
||
api: | ||
container_name: backend-api | ||
image: ghcr.io/ecmwfcode4earth/vairify/vairify-backend-api | ||
depends_on: | ||
- db | ||
ports: | ||
- 8000:8000 | ||
environment: | ||
- MONGO_DB_URI=mongodb://mongo:27017 | ||
- MONGO_DB_NAME=${MONGO_DB_NAME} | ||
|
||
ui: | ||
container_name: frontend-ui | ||
image: ghcr.io/ecmwfcode4earth/vairify/vairify-frontend-prod | ||
depends_on: | ||
- api | ||
ports: | ||
- 8001:80 | ||
volumes: | ||
- data_textures:/app/data_textures | ||
|
||
|
||
volumes: | ||
database: {} | ||
data_textures: {} |