Fix migration issues
This commit is contained in:
60
docker-compose-simple.yml
Normal file
60
docker-compose-simple.yml
Normal file
@ -0,0 +1,60 @@
|
||||
services:
|
||||
postgres-db:
|
||||
image: kartoza/postgis:12.0
|
||||
ports:
|
||||
- 5432:5432
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql
|
||||
- ./custom-postgresql.conf:/etc/postgresql/12/main/postgresql.conf
|
||||
- ./rogaining.sql:/sql/rogaining.sql
|
||||
- ./sqls:/sqls
|
||||
- ./create_location2025_table.sql:/sql/create_location2025_table.sql
|
||||
environment:
|
||||
- POSTGRES_USER=${POSTGRES_USER}
|
||||
- POSTGRES_PASS=${POSTGRES_PASS}
|
||||
- POSTGRES_DBNAME=${POSTGRES_DBNAME}
|
||||
- POSTGRES_MAX_CONNECTIONS=600
|
||||
restart: "no"
|
||||
networks:
|
||||
- rog-api
|
||||
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.gdal
|
||||
command: bash -c "./wait-for-postgres.sh postgres-db && python manage.py migrate && gunicorn config.wsgi:application --bind 0.0.0.0:8000"
|
||||
volumes:
|
||||
- .:/app
|
||||
- static_volume:/app/static
|
||||
- media_volume:/app/media
|
||||
env_file:
|
||||
- .env
|
||||
restart: "no"
|
||||
depends_on:
|
||||
- postgres-db
|
||||
networks:
|
||||
- rog-api
|
||||
|
||||
nginx:
|
||||
image: nginx:1.19
|
||||
volumes:
|
||||
- ./nginx.conf:/etc/nginx/nginx.conf
|
||||
- static_volume:/app/static
|
||||
- media_volume:/app/media
|
||||
- ./supervisor/html:/usr/share/nginx/html
|
||||
ports:
|
||||
- 8100:80
|
||||
restart: "no"
|
||||
depends_on:
|
||||
- app
|
||||
networks:
|
||||
- rog-api
|
||||
|
||||
networks:
|
||||
rog-api:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
static_volume:
|
||||
media_volume:
|
||||
Reference in New Issue
Block a user