membersystem/docker-compose.yml
2024-07-20 22:24:41 +02:00

38 lines
845 B
YAML

services:
app:
build:
context: .
args:
- REQUIREMENTS_FILE=requirements/requirements-dev.txt
command: python /app/src/manage.py runserver 0.0.0.0:8000
tty: true
ports:
- "8000:8000"
volumes:
- ./:/app/
depends_on:
postgres:
condition: service_healthy
env_file:
- .env
postgres:
image: postgres:13-alpine
volumes:
- postgres_data:/var/lib/postgresql/data/
ports:
- 5432:5432
env_file:
- .env
# This healthcheck has a large number of retries, this is currently based on the number of
# retries necessary to get the database running in GitHub Actions.
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres -d postgres" ]
interval: 5s
timeout: 5s
retries: 30
volumes:
postgres_data:
...