diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..1cdd2a0 --- /dev/null +++ b/docker-compose.yml @@ -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: \ No newline at end of file diff --git a/proxy/nginx.conf b/proxy/nginx.conf index e19f6cb..b62f28a 100644 --- a/proxy/nginx.conf +++ b/proxy/nginx.conf @@ -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;