Fix migration issues

This commit is contained in:
2025-08-25 14:28:30 +09:00
parent 961c577ec8
commit 6886ba15c8
7 changed files with 403 additions and 28 deletions

60
docker-compose-simple.yml Normal file
View 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: