2025-01-20 14:33:03 +05:00
|
|
|
services:
|
|
|
|
api:
|
2025-01-24 11:43:18 +05:00
|
|
|
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:
|
2025-01-24 11:43:18 +05:00
|
|
|
- /home/<username>/docker/council-api/staticfiles:/home/app/api/staticfiles
|
2025-01-20 14:33:03 +05:00
|
|
|
ports:
|
2025-01-24 11:43:18 +05:00
|
|
|
- 5000:5000
|
2025-01-20 14:33:03 +05:00
|
|
|
env_file:
|
|
|
|
- ./.env
|
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
- redis
|
|
|
|
|
|
|
|
db:
|
|
|
|
image: postgres:15
|
2025-01-24 11:43:18 +05:00
|
|
|
restart: always
|
2025-01-20 14:33:03 +05:00
|
|
|
volumes:
|
2025-01-24 11:43:18 +05:00
|
|
|
- ./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}
|
2025-01-24 11:43:18 +05:00
|
|
|
ports:
|
|
|
|
- 5232:5432
|
2025-01-20 14:33:03 +05:00
|
|
|
|
|
|
|
redis:
|
|
|
|
image: "redis:alpine"
|
|
|
|
restart: always
|
|
|
|
expose:
|
|
|
|
- "6379"
|
2025-01-24 11:43:18 +05:00
|
|
|
|
|
|
|
|