mirror of
https://github.com/i701/sarlink-portal-api.git
synced 2025-02-20 19:52:01 +00:00
- 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
38 lines
738 B
YAML
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"
|
|
|
|
|