40 lines
630 B
YAML
40 lines
630 B
YAML
name: ft_transcendence
|
|
|
|
services:
|
|
django:
|
|
build: srcs/
|
|
image: django
|
|
networks:
|
|
- network
|
|
ports:
|
|
- "8000:8000"
|
|
container_name: django
|
|
restart: always
|
|
env_file: .env
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
restart: true
|
|
|
|
db:
|
|
image: postgres
|
|
volumes:
|
|
- db:/var/lib/postgresql/data
|
|
networks:
|
|
- network
|
|
container_name: db
|
|
restart: always
|
|
env_file: .env
|
|
healthcheck:
|
|
test: "pg_isready -U $POSTGRES_USER"
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
volumes:
|
|
db:
|
|
|
|
networks:
|
|
network:
|
|
driver: bridge
|