django-template/docker-compose.dev.yaml
jnfire ae2758a44f update code and fix errors
update code and fix errors
2022-08-02 08:56:21 +02:00

81 lines
1.8 KiB
YAML

version: '3.8'
services:
postgresql:
image: postgres
container_name: ${PROJECT_NAME}-postgresql
restart: "no"
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
ports:
- ${DB_PORT}:5432
django:
build:
context: ./
dockerfile: ./Dockerfiles/django/Dockerfile
container_name: ${PROJECT_NAME}-django
restart: "no"
entrypoint: /django-launcher.sh
volumes:
- .:/usr/src/app/
environment:
DEBUG: "False"
ALLOWED_HOSTS: ${DOMAIN}
SECRET_KEY: ${DJANGO_SECRET_KEY}
DB_NAME: ${DB_NAME}
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
DB_HOST: ${DB_HOST}
DB_PORT: ${DB_PORT}
DOMAIN: ${DOMAIN}
DOMAIN_URL: ${DOMAIN_URL}
STATIC_URL: /static/
STATIC_ROOT: static
MEDIA_URL: /media/
REDIS_HOST: ${REDIS_HOST}
REDIS_PORT: ${REDIS_PORT}
EMAIL_HOST: ${EMAIL_HOST}
EMAIL_USE_TLS: ${EMAIL_USE_TLS}
EMAIL_USE_SSL: ${EMAIL_USE_SSL}
EMAIL_PORT: ${EMAIL_PORT}
EMAIL_USER: ${EMAIL_USER}
EMAIL_PASSWORD: ${EMAIL_PASSWORD}
expose:
- 8000
depends_on:
- postgresql
links:
- redis
caddy:
image: caddy:alpine
container_name: ${PROJECT_NAME}-caddy
restart: "no"
ports:
- ${CADDY_PORT_ONE}:80
- ${CADDY_PORT_TWO}:443
volumes:
- ./Caddyfile.dev:/etc/caddy/Caddyfile
- ./caddy_data:/data
- .:/usr/src/app/
depends_on:
- django
redis:
image: redis:alpine
container_name: ${PROJECT_NAME}-redis
restart: "no"
expose:
- ${REDIS_PORT}
mailhog:
image: mailhog/mailhog:latest
container_name: ${PROJECT_NAME}-mailhog
restart: "no"
expose:
- 1025