Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sprint release 05 #216

Merged
merged 45 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
952a651
merge
Lucas-Nan May 21, 2024
e38223c
Merge branch 'sprint-release' into dev_ln
Lucas-Nan May 21, 2024
61b2a67
Added dataset selection screen and main menu
Corgam May 23, 2024
f80e0ee
Added alerts
Corgam May 23, 2024
aaaba10
Finished alerts + moved them into their context
Corgam May 23, 2024
d8a7f33
Fixed tab dialog not closing
Corgam May 23, 2024
688f8c7
Fixed small bug
Corgam May 23, 2024
ca12b58
Merge branch 'frontend' into CI-CD
Corgam May 23, 2024
8b44f02
Added alert for failed fetching + updated readme
Corgam May 23, 2024
bc5f984
Frontend - Polishing part 1 (#174)
Corgam May 23, 2024
a905151
Started working on fixing the FE->BE connection
Corgam May 23, 2024
66d8d2c
Further work on connection
Corgam May 23, 2024
f69487f
More work on connection
Corgam May 23, 2024
0d7f36e
Merge branch 'sprint-release' into dev_ln
Lucas-Nan May 25, 2024
acf6072
test: different crs - using s2cloudless-2020 from eu
Lucas-Nan May 25, 2024
c0116af
using WMS Deutschlandmosaik aus Sentinel-2-Daten as map bg
Lucas-Nan May 25, 2024
83827db
wip: added show pinned map data | added default bundeslaender json TO…
Lucas-Nan May 27, 2024
026c4c0
added btn for switching satellite/openstreetmap and support for custo…
Lucas-Nan May 27, 2024
709e7be
added satellite view with satellite for germany, orthofoto for bavari…
Lucas-Nan May 27, 2024
ac1cb5c
small cleanup for linter
Lucas-Nan May 27, 2024
f4ec1c2
added forgotten default json
Lucas-Nan May 27, 2024
242c42c
Polishing Data View
CelineMP May 28, 2024
5582db2
added search flyto to fixed coords in berlin
Lucas-Nan May 28, 2024
d03bdbb
Removing old import statements
CelineMP May 28, 2024
faa6964
Removed any type
CelineMP May 28, 2024
956d763
Map Update (#186)
CelineMP May 28, 2024
4313dfb
Fixed linting + moved search at the top
Corgam May 28, 2024
578e4e9
Added icon to the search bar
Corgam May 28, 2024
bcc904a
Polishing Data View (#187)
Corgam May 28, 2024
2c635ec
Merge branch 'sprint-release' into CI-CD
Corgam May 28, 2024
0dba7dd
Updated the fetch data function to include multiple datasets
Corgam May 28, 2024
c56d546
Added FE docker image build argument for host and port of BE
Corgam May 28, 2024
05534b2
Changed docker compose to support multiple images tags
Corgam May 28, 2024
0ee484a
Updated the prod. env deployment github action
Corgam May 28, 2024
2a01381
Fixed typos
Corgam May 28, 2024
6bbce90
Worked on the API URL changing based on the environment (#202)
Corgam May 28, 2024
2138714
Fixed GitHub actions docker build args not working
Corgam May 28, 2024
95b49cd
Fixed GitHub actions docker build args not working (#204)
Corgam May 28, 2024
ebdee18
Fixed env. not working on local [TEMP]: --signoff
Corgam May 28, 2024
85b910b
Fixed env. variables for BE [TEMP]
Corgam May 28, 2024
eb0cde9
Background
Corgam May 28, 2024
b85988e
Background (#205)
Corgam May 28, 2024
39a118b
Revert "Background (#205)"
Corgam May 28, 2024
3c0be05
Revert "Fixed env. variables for BE [TEMP]"
Corgam May 28, 2024
8e6cac4
Revert "Fixed env. not working on local [TEMP]: --signoff"
Corgam May 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .env
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
### Config ###
ENVIRONMENT_STAGE=Development
### CONFIG ###

### Ports and hosts ###
# The environment stage set for individual services
ENVIRONMENT_STAGE=development
# The tag used for pulling the docker images
DOCKER_COMPOSE_IMAGES_TAG=test

### HOSTS & PORTS ###

# Frontend
FRONTEND_HOST=frontend
FRONTEND_PORT=80

# Backend
BACKEND_HOST=api-gateway
BACKEND_PORT=8081
VITE_BACKEND_HOST=localhost
VITE_BACKEND_PORT=8081
16 changes: 16 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
### CONFIG ###

# The environment stage set for individual services
ENVIRONMENT_STAGE=production
# The tag used for pulling the docker images
DOCKER_COMPOSE_IMAGES_TAG=production

### HOSTS & PORTS ###

# Frontend
FRONTEND_HOST=frontend
FRONTEND_PORT=80

# Backend
VITE_BACKEND_HOST=prod.amos.b-ci.de
VITE_BACKEND_PORT=8081
16 changes: 16 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
### CONFIG ###

# The environment stage set for individual services
ENVIRONMENT_STAGE=test
# The tag used for pulling the docker images
DOCKER_COMPOSE_IMAGES_TAG=test

### HOSTS & PORTS ###

# Frontend
FRONTEND_HOST=frontend
FRONTEND_PORT=80

# Backend
VITE_BACKEND_HOST=test.amos.b-ci.de
VITE_BACKEND_PORT=8081
75 changes: 48 additions & 27 deletions .github/workflows/deploy_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,25 @@ on:
env:
REGISTRY: ghcr.io
IMAGE_NAME: amosproj/amos2024ss04-building-information-enhancer
STAGE: production

jobs:
build-and-publish-frontend:
name: Build and publish the Frontend image
name: Build and publish - Frontend
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{github.ref_name}}
ref: ${{ github.ref_name }}

- name: Log in to the container registry
uses: docker/login-action@v3
with:
registry: ${{env.REGISTRY}}
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for Docker
id: meta
Expand All @@ -35,16 +36,21 @@ jobs:
tags: |
type=ref,event=tag
type=sha
type=raw,value=${{ env.STAGE }}
latest
labels: |
stage=${{ env.STAGE }}

- name: Build and Publish Docker Images
uses: docker/build-push-action@v5
with:
context: ./frontend
file: ./frontend/Dockerfile
push: true
tags: ${{steps.meta.outputs.tags}}
labels: ${{steps.meta.outputs.labels}}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
STAGE=${{ env.STAGE }}

build-and-publish-backend-api-gateway:
name: Build and publish - API Gateway
Expand All @@ -54,14 +60,14 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{github.ref_name}}
ref: ${{ github.ref_name }}

- name: Log in to the container registry
uses: docker/login-action@v3
with:
registry: ${{env.REGISTRY}}
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for Docker
id: meta
Expand All @@ -71,16 +77,21 @@ jobs:
tags: |
type=ref,event=tag
type=sha
type=raw,value=${{ env.STAGE }}
latest
labels: |
stage=${{ env.STAGE }}

- name: Build and Publish Docker Images
uses: docker/build-push-action@v5
with:
context: ./backend/src/BIE.Core
file: ./backend/src/BIE.Core/Dockerfile
push: true
tags: ${{steps.meta.outputs.tags}}
labels: ${{steps.meta.outputs.labels}}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
STAGE=${{ env.STAGE }}

build-and-publish-backend-datapipeline:
name: Build and publish - Data Pipeline
Expand All @@ -90,14 +101,14 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{github.ref_name}}
ref: ${{ github.ref_name }}

- name: Log in to the container registry
uses: docker/login-action@v3
with:
registry: ${{env.REGISTRY}}
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for Docker
id: meta
Expand All @@ -107,16 +118,21 @@ jobs:
tags: |
type=ref,event=tag
type=sha
type=raw,value=${{ env.STAGE }}
latest
labels: |
stage=${{ env.STAGE }}

- name: Build and Publish Docker Images
uses: docker/build-push-action@v5
with:
context: ./backend/src/BIE.DataPipeline
file: ./backend/src/BIE.DataPipeline/Dockerfile
push: true
tags: ${{steps.meta.outputs.tags}}
labels: ${{steps.meta.outputs.labels}}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
STAGE=${{ env.STAGE }}

build-and-publish-backend-sql-database:
name: Build and publish - SQL Database
Expand All @@ -126,14 +142,14 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{github.ref_name}}
ref: ${{ github.ref_name }}

- name: Log in to the container registry
uses: docker/login-action@v3
with:
registry: ${{env.REGISTRY}}
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for Docker
id: meta
Expand All @@ -143,16 +159,21 @@ jobs:
tags: |
type=ref,event=tag
type=sha
type=raw,value=${{ env.STAGE }}
latest
labels: |
stage=${{ env.STAGE }}

- name: Build and Publish Docker Images
uses: docker/build-push-action@v5
with:
context: ./backend/database
file: ./backend/database/Dockerfile
push: true
tags: ${{steps.meta.outputs.tags}}
labels: ${{steps.meta.outputs.labels}}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
STAGE=${{ env.STAGE }}

deploy-prod-env:
needs:
Expand All @@ -162,7 +183,7 @@ jobs:
build-and-publish-backend-datapipeline,
build-and-publish-backend-sql-database,
]
name: Deploy Image in the Production Environment
name: Deploy - Production Environment
runs-on: ubuntu-latest

steps:
Expand All @@ -178,7 +199,7 @@ jobs:
- name: Copy necessary files
run: |
scp ./docker-compose.yml ${{secrets.PROD_ENV_SSH_USER}}@${{secrets.PROD_ENV_SSH_HOST}}:/var/lib/bie
scp ./.env ${{secrets.PROD_ENV_SSH_USER}}@${{secrets.PROD_ENV_SSH_HOST}}:/var/lib/bie
scp ./.env.production ${{secrets.PROD_ENV_SSH_USER}}@${{secrets.PROD_ENV_SSH_HOST}}:/var/lib/bie/.env
- name: Connect and Pull
run: ssh ${{secrets.PROD_ENV_SSH_USER}}@${{secrets.PROD_ENV_SSH_HOST}} "cd /var/lib/bie && docker compose pull && docker compose up -d --remove-orphans && exit"
- name: Cleanup
Expand Down
Loading
Loading