django_template/docker-compose.dev.yml

48 lines
1.1 KiB
YAML

version: "3.8"
services:
# To use an built-in Postgres server, uncomment this service
#db:
# # Use regular Postgres by default
# image: postgres:15.3-bullseye
# # Use PostGIS for spatial apps
# #image: postgis/postgis:15-3.3
# env_file: .env
# volumes:
# - db_data:/var/lib/postgresql/data
# healthcheck:
# test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
# interval: 10s
# timeout: 5s
# retries: 5
# restart: "unless-stopped"
app:
image: localhost/your_app_image_here
build:
context: ./django
# To build image with extra dev tools
#dockerfile: Dockerfile.dev
command: python manage.py runserver 0.0.0.0:8000
env_file: .env
volumes:
- ./django:/code
- static_files:/static
- media_files:/media
- docs:/docs
# Comment this out if you're not using SQLite
- ./db:/db
restart: "unless-stopped"
# To use an built-in Postgres server, uncomment this dependency
#depends_on:
# db:
# condition: service_healthy
ports:
- "$APP_PORT:8000"
volumes:
db_data:
static_files:
media_files:
docs: