This commit is contained in:
godd0t 2023-05-10 09:31:01 +02:00
parent 11c4ba3708
commit b0627a98bf
2 changed files with 4 additions and 5 deletions

View File

@ -3,8 +3,6 @@ version: '3.9'
services:
backend:
container_name: "${APP_NAME}-backend"
extra_hosts:
- "localhost:${APP_HOST}"
build:
context: .
dockerfile: deployment/Dockerfile
@ -17,7 +15,7 @@ services:
- ./deployment/scripts:/app/deployment/scripts/
labels:
- "traefik.enable=true"
- "traefik.http.routers.${APP_NAME}-backend.rule=Host(`${APP_HOST}`)"
- "traefik.http.routers.${APP_NAME}-backend.rule=Host(`${APP_DOMAIN}`)"
- "traefik.http.routers.${APP_NAME}-backend.entrypoints=web-secure"
- "traefik.http.services.${APP_NAME}-backend.loadbalancer.server.port=${APP_PORT}"
# ports:

View File

@ -1,6 +1,6 @@
# Application configuration variables
APP_NAME=project_name
APP_HOST=app.backend.dev
APP_HOST=0.0.0.0
APP_PORT=8000
APP_SECRET_KEY='ur secret key'
APP_ENV=dev
@ -19,3 +19,4 @@ POSTGRES_HOST=db
# Traefik configuration variables
LETSENCRYPT_EMAIL=your_email
APP_DOMAIN=app.backend.dev