Added docker-compose.yml
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Administrator 2023-03-16 09:26:35 +01:00
parent f8c551c50b
commit 7c78ad2a59
2 changed files with 34 additions and 1 deletions

33
docker-compose.yml Normal file
View File

@ -0,0 +1,33 @@
version: '3'
services:
nginx:
image: jonasal/nginx-certbot:latest
restart: unless-stopped
environment:
- CERTBOT_EMAIL
env_file:
- ./nginx-certbot.env
ports:
- 80:80
- 443:443
volumes:
- nginx_secrets:/etc/letsencrypt
- ./user_conf.d:/etc/nginx/user_conf.d
frontend:
image: registry.flokaiser.com/dhbw/cloud-computing-frontend:latest
restart: unless-stopped
backend:
image: registry.flokaiser.com/dhbw/cloud-computing-backend:latest
restart: unless-stopped
env_file:
- DATABASE_URL=${DATABASE_URL}
- AZURE_KEY=${AZURE_KEY}
- AZURE_ENDPOINT=${AZURE_ENDPOINT}
- AZURE_LOCATION=${AZURE_LOCATION}
- ENV=${ENV}
volumes:
nginx_secrets:

View File

@ -24,7 +24,7 @@ http {
location /api {
# Forward requests to port 80
proxy_pass http://backend:80/api/;
proxy_pass http://backend:8080/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;