Adapt docker-compose and nginx.conf for deployment on infra

This commit is contained in:
Gérald Colangelo
2026-04-02 11:41:09 +02:00
parent fde92f92db
commit 405ec8a300
3 changed files with 27 additions and 9 deletions

View File

@@ -12,8 +12,12 @@ services:
interval: 5s
timeout: 5s
retries: 5
networks:
local_net:
aliases:
- ${COMPOSE_PROJECT_NAME}-db
web:
app:
build: .
command: >
sh -c "python manage.py migrate --noinput &&
@@ -23,23 +27,36 @@ services:
python manage.py runserver 0.0.0.0:8000"
volumes:
- .:/app
ports:
- "8000:8000"
#ports:
#- "8000:8000"
depends_on:
db:
condition: service_healthy
env_file:
- .env
networks:
local_net:
aliases:
- ${COMPOSE_PROJECT_NAME}-app
frontend:
web:
image: nginx:alpine
volumes:
- ./frontend:/usr/share/nginx/html:ro
- ./frontend/nginx.conf:/etc/nginx/conf.d/default.conf:ro
ports:
- "5173:80"
# ports:
#- "5173:80"
depends_on:
- web
- app
networks:
local_net:
aliases:
- ${COMPOSE_PROJECT_NAME}-web
volumes:
postgres_data:
networks:
local_net:
name: ${NETWORK}
external: true