django-template/docker-compose.yaml

76 lines
1.5 KiB
YAML
Raw Normal View History

2022-06-27 14:28:40 +02:00
version: '3.8'
2021-04-01 09:48:35 +02:00
services:
2021-10-21 22:43:31 +02:00
postgresql:
image: postgres
restart: "no"
environment:
2022-06-27 14:28:40 +02:00
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
POSTGRES_DB: "ccstech"
2021-10-21 22:43:31 +02:00
ports:
- 5432:5432
2021-04-01 09:48:35 +02:00
django:
build:
context: ./
2021-07-05 11:45:32 +02:00
dockerfile: ./Dockerfiles/django/Dockerfile
2022-06-27 14:28:40 +02:00
restart: "no"
entrypoint: /django-launcher.sh
2021-04-01 09:48:35 +02:00
volumes:
- .:/usr/src/app/
environment:
DEBUG: "True"
2022-06-27 14:28:40 +02:00
ALLOWED_HOSTS: "ccstech.localhost"
2021-10-21 22:43:31 +02:00
SECRET_KEY: "misecreto"
DB_ENGINE: "django.db.backends.postgresql"
2022-06-27 14:28:40 +02:00
DB_NAME: "ccstech"
2021-10-21 22:43:31 +02:00
DB_USER: "postgres"
DB_PASSWORD: "postgres"
DB_HOST: "postgresql"
DB_PORT: "5432"
2022-06-27 14:28:40 +02:00
DOMAIN: "ccstech.localhost"
DOMAIN_URL: "http://ccstech.localhost"
2021-04-01 09:48:35 +02:00
STATIC_URL: "/static/"
2021-04-21 16:55:33 +02:00
STATIC_ROOT: "static"
2021-04-01 09:48:35 +02:00
MEDIA_URL: "/media/"
2021-08-26 18:17:34 +02:00
REDIS_HOST: "redis"
REDIS_PORT: "6379"
2021-04-01 09:48:35 +02:00
EMAIL_HOST: "mailhog"
EMAIL_USE_TLS: "False"
EMAIL_PORT: "1025"
EMAIL_USER: ""
EMAIL_PASSWORD: ""
expose:
- 8000
2021-10-21 22:43:31 +02:00
depends_on:
- postgresql
2021-04-01 09:48:35 +02:00
caddy:
image: caddy:alpine
2022-06-27 14:28:40 +02:00
restart: "no"
2021-04-01 09:48:35 +02:00
ports:
- 80:80
- 443:443
volumes:
2022-06-27 14:28:40 +02:00
- ./Caddyfile:/etc/caddy/Caddyfile
- ./caddy_data:/data
2021-04-01 09:48:35 +02:00
- .:/usr/src/app/
depends_on:
- django
2021-06-14 09:21:19 +02:00
redis:
image: redis:alpine
2022-06-27 14:28:40 +02:00
restart: "no"
2021-06-14 09:21:19 +02:00
expose:
- 6379
2021-04-01 09:48:35 +02:00
mailhog:
image: mailhog/mailhog:latest
2022-06-27 14:28:40 +02:00
restart: "no"
2021-04-01 09:48:35 +02:00
expose:
2021-06-13 22:04:20 +02:00
- 1025
2021-04-01 09:48:35 +02:00
ports:
- 8025:8025