76 lines
1.6 KiB
YAML
76 lines
1.6 KiB
YAML
version: '3.1'
|
|
|
|
services:
|
|
|
|
postgresql:
|
|
image: postgres
|
|
restart: "no"
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: nombre-base-de-datos
|
|
ports:
|
|
- 5432:5432
|
|
|
|
django:
|
|
build:
|
|
context: ./
|
|
dockerfile: ./Dockerfiles/django/Dockerfile
|
|
restart: unless-stopped
|
|
entrypoint: /django-launcher.dev.sh
|
|
volumes:
|
|
- .:/usr/src/app/
|
|
environment:
|
|
DEBUG: "True"
|
|
ALLOWED_HOSTS: "ejemplo.localhost"
|
|
SECRET_KEY: "misecreto"
|
|
DB_ENGINE: "django.db.backends.postgresql"
|
|
DB_NAME: "nombre-base-de-datos"
|
|
DB_USER: "postgres"
|
|
DB_PASSWORD: "postgres"
|
|
DB_HOST: "postgresql"
|
|
DB_PORT: "5432"
|
|
DOMAIN: "ejemplo.localhost"
|
|
DOMAIN_URL: "http://ejemplo.localhost"
|
|
STATIC_URL: "/static/"
|
|
STATIC_ROOT: "static"
|
|
MEDIA_URL: "/media/"
|
|
REDIS_HOST: "redis"
|
|
REDIS_PORT: "6379"
|
|
EMAIL_HOST: "mailhog"
|
|
EMAIL_USE_TLS: "False"
|
|
EMAIL_PORT: "1025"
|
|
EMAIL_USER: ""
|
|
EMAIL_PASSWORD: ""
|
|
expose:
|
|
- 8000
|
|
depends_on:
|
|
- postgresql
|
|
|
|
caddy:
|
|
image: caddy:alpine
|
|
restart: unless-stopped
|
|
ports:
|
|
- 80:80
|
|
- 443:443
|
|
volumes:
|
|
- ./Caddyfile.dev:/etc/caddy/Caddyfile
|
|
- ./../caddy_data:/data
|
|
- .:/usr/src/app/
|
|
depends_on:
|
|
- django
|
|
|
|
redis:
|
|
image: redis:alpine
|
|
restart: unless-stopped
|
|
expose:
|
|
- 6379
|
|
|
|
mailhog:
|
|
image: mailhog/mailhog:latest
|
|
restart: unless-stopped
|
|
expose:
|
|
- 1025
|
|
ports:
|
|
- 8025:8025
|