sarlink-portal-api/docker-compose.yml

38 lines
738 B
YAML
Raw Normal View History

2025-01-20 14:33:03 +05:00
services:
api:
build:
context: .
restart: always
command: gunicorn apibase.wsgi:application --bind 0.0.0.0:5000 --workers=2
2025-01-20 14:33:03 +05:00
volumes:
- /home/<username>/docker/council-api/staticfiles:/home/app/api/staticfiles
2025-01-20 14:33:03 +05:00
ports:
- 5000:5000
2025-01-20 14:33:03 +05:00
env_file:
- ./.env
depends_on:
- db
- redis
db:
image: postgres:15
restart: always
2025-01-20 14:33:03 +05:00
volumes:
- ./postgres_data:/var/lib/postgresql/data/
env_file:
- ./.env
2025-01-20 14:33:03 +05:00
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DATABASE}
ports:
- 5232:5432
2025-01-20 14:33:03 +05:00
redis:
image: "redis:alpine"
restart: always
expose:
- "6379"