Add deployment and improve Dockerfiles and CICD

This commit is contained in:
jkreller
2024-02-06 20:16:27 +00:00
committed by ekresse
parent b22c6c010b
commit 130dfb9698
12 changed files with 188 additions and 125 deletions

View File

@ -2,25 +2,32 @@ version: "3.9"
services:
htwkalender-backend:
build:
dockerfile: Dockerfile
context: ./backend
image: DOCKER_REGISTRY_REPO:backend # DOCKER_REGISTRY_REPO will be replaced by CI
command: "--http=0.0.0.0:8090 --dir=/htwkalender/data/pb_data"
pull_policy: always
# open port 8090
ports:
- "8090:8090"
command: "/htwkalender serve --http=0.0.0.0:8090 --dir=/pb_data"
volumes:
- ./backend/pb_data:/pb_data
- pb_data:/htwkalender/data
htwkalender-frontend:
build:
context: ./frontend
dockerfile: Dockerfile_prod
image: DOCKER_REGISTRY_REPO:frontend # DOCKER_REGISTRY_REPO will be replaced by CI
pull_policy: always
ports:
- "8000:8000"
depends_on:
- htwkalender-backend
rproxy:
image: nginx:stable
image: bitnami/nginx:1.25
volumes:
- ./reverseproxy.conf:/etc/nginx/nginx.conf
- ./reverseproxy.conf:/opt/bitnami/nginx/conf/nginx.conf
depends_on:
- htwkalender-backend
- htwkalender-frontend
ports:
- "80:80"
volumes:
pb_data: