sarlink-portal-api/docker-compose.yml
i701 fea31cd651
Refactor Docker and Django configuration
- Update Dockerfile to use Python 3.11-slim and optimize build steps
- Remove Dockerfile.prod and update docker-compose.yml
- Remove entrypoint.sh and twilio dependency
- Modify Django settings for production security and configuration
- Update user serializer to include group permissions
- Enhance CSRF and SSL configuration settings
2025-02-12 19:27:05 +05:00

38 lines
738 B
YAML

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