mirror of
https://github.com/i701/sarlink-portal-api.git
synced 2025-06-28 09:50:05 +00:00
Refactor Docker configuration and API endpoints
- Merged production and development Docker configurations - Updated Dockerfile to use multi-stage build - Removed separate Dockerfile.prod - Modified docker-compose.yml for production settings - Added new API endpoints for user filtering by ID card - Updated serializers and views for Atoll and Island management - Enhanced user and atoll-related filters and views
This commit is contained in:
@ -1,11 +1,14 @@
|
||||
services:
|
||||
api:
|
||||
build: .
|
||||
command: python manage.py runserver 0.0.0.0:8000
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.prod
|
||||
restart: always
|
||||
command: gunicorn apibase.wsgi:application --bind 0.0.0.0:5000 --workers=2
|
||||
volumes:
|
||||
- ./:/usr/src/app/
|
||||
- /home/<username>/docker/council-api/staticfiles:/home/app/api/staticfiles
|
||||
ports:
|
||||
- 8000:8000
|
||||
- 5000:5000
|
||||
env_file:
|
||||
- ./.env
|
||||
depends_on:
|
||||
@ -14,17 +17,22 @@ services:
|
||||
|
||||
db:
|
||||
image: postgres:15
|
||||
restart: always
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data/
|
||||
- ./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"
|
||||
volumes:
|
||||
postgres_data:
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user