feat(Directus): Split configuration and add SMTP variable
This commit is contained in:
parent
c3b9f78ef6
commit
23f2bf72df
|
@ -4,7 +4,7 @@
|
||||||
#DOCKER_CONTEXT=
|
#DOCKER_CONTEXT=
|
||||||
#DOCKER_HOST=
|
#DOCKER_HOST=
|
||||||
SERVICES_DIR=..
|
SERVICES_DIR=..
|
||||||
COMPOSE_FILE=./docker-compose.yml:${SERVICES_DIR}/postgres/docker-compose.yml:${SERVICES_DIR}/redis/docker-compose.yml:${SERVICES_DIR}/traefik/docker-compose.network.yml
|
COMPOSE_FILE=${SERVICES_DIR}/directus/docker-compose.yml:${SERVICES_DIR}/directus/docker-compose.traefik.yml:${SERVICES_DIR}/directus/docker-compose.smtp.yml:${SERVICES_DIR}/postgres/docker-compose.yml:${SERVICES_DIR}/redis/docker-compose.yml
|
||||||
#COMPOSE_PROJECT_NAME=
|
#COMPOSE_PROJECT_NAME=
|
||||||
|
|
||||||
##########
|
##########
|
||||||
|
@ -13,10 +13,20 @@ COMPOSE_FILE=./docker-compose.yml:${SERVICES_DIR}/postgres/docker-compose.yml:${
|
||||||
# see https://github.com/directus/directus/blob/main/api/example.env
|
# see https://github.com/directus/directus/blob/main/api/example.env
|
||||||
|
|
||||||
DIRECTUS_DOMAIN=directus.cool.life
|
DIRECTUS_DOMAIN=directus.cool.life
|
||||||
|
DIRECTUS_PUBLIC_URL=https://${DIRECTUS_DOMAIN}
|
||||||
DIRECTUS_KEY=255d861b-5ea1-5996-9aa3-922530ec40b1
|
DIRECTUS_KEY=255d861b-5ea1-5996-9aa3-922530ec40b1
|
||||||
DIRECTUS_SECRET=6116487b-cda1-52c2-b5b5-c8022c45e263
|
DIRECTUS_SECRET=6116487b-cda1-52c2-b5b5-c8022c45e263
|
||||||
DIRECTUS_ADMIN_EMAIL=admin@example.com
|
DIRECTUS_ADMIN_EMAIL=admin@example.com
|
||||||
DIRECTUS_ADMIN_PASSWORD=d1r3ctu5
|
DIRECTUS_ADMIN_PASSWORD=d1r3ctu5
|
||||||
|
|
||||||
|
EMAIL_FROM=no-reply@${DIRECTUS_DOMAIN}
|
||||||
|
EMAIL_SMTP_HOST=mail.example.org
|
||||||
|
#EMAIL_SMTP_PORT=
|
||||||
|
EMAIL_SMTP_USER=user
|
||||||
|
EMAIL_SMTP_PASSWORD=password
|
||||||
|
#EMAIL_SMTP_SECURE=
|
||||||
|
#EMAIL_SMTP_IGNORE_TLS=
|
||||||
|
|
||||||
# DIRECTUS_PUID=
|
# DIRECTUS_PUID=
|
||||||
# DIRECTUS_PGID=
|
# DIRECTUS_PGID=
|
||||||
|
|
||||||
|
@ -28,3 +38,16 @@ POSTGRES_PASSWORD=password-example
|
||||||
POSTGRES_DB=postgres-database-name-example
|
POSTGRES_DB=postgres-database-name-example
|
||||||
POSTGRES_CONTAINER_NAME=directus-postgres
|
POSTGRES_CONTAINER_NAME=directus-postgres
|
||||||
POSTGRES_VOLUME_NAME=directus-postgres
|
POSTGRES_VOLUME_NAME=directus-postgres
|
||||||
|
#POSTGRES_IMAGE=
|
||||||
|
|
||||||
|
#######
|
||||||
|
# REDIS
|
||||||
|
|
||||||
|
#REDIS_CONTAINER_NAME=
|
||||||
|
|
||||||
|
#########
|
||||||
|
# TRAEFIK
|
||||||
|
|
||||||
|
#TRAEFIK_NETWORK_NAME=
|
||||||
|
#TRAEFIK_ROUTER_NAME= # Don't use char '.'
|
||||||
|
#TRAEFIK_ENTRYPOINTS=
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
version: "3.8"
|
||||||
|
|
||||||
|
services:
|
||||||
|
directus:
|
||||||
|
environment:
|
||||||
|
CACHE_ENABLED: 'true'
|
||||||
|
CACHE_STORE: 'redis'
|
||||||
|
CACHE_REDIS: 'redis://${REDIS_CONTAINER_NAME:-redis}:6379'
|
|
@ -0,0 +1,15 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
version: "3.8"
|
||||||
|
|
||||||
|
services:
|
||||||
|
directus:
|
||||||
|
environment:
|
||||||
|
EMAIL_TRANSPORT: smtp
|
||||||
|
EMAIL_FROM: ${EMAIL_FROM:?err}
|
||||||
|
EMAIL_SMTP_HOST: ${EMAIL_SMTP_HOST}
|
||||||
|
EMAIL_SMTP_PORT: ${EMAIL_SMTP_PORT:-465}
|
||||||
|
EMAIL_SMTP_USER: ${EMAIL_SMTP_USER:?err}
|
||||||
|
EMAIL_SMTP_PASSWORD: ${EMAIL_SMTP_PASSWORD:?err}
|
||||||
|
EMAIL_SMTP_SECURE: ${EMAIL_SMTP_SECURE:-true}
|
||||||
|
EMAIL_SMTP_IGNORE_TLS: ${EMAIL_SMTP_IGNORE_TLS:-false}
|
|
@ -0,0 +1,15 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
version: "3.8"
|
||||||
|
|
||||||
|
networks:
|
||||||
|
default:
|
||||||
|
name: ${TRAEFIK_NETWORK_NAME:-traefik}
|
||||||
|
|
||||||
|
services:
|
||||||
|
directus:
|
||||||
|
labels:
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.docker.network=${TRAEFIK_NETWORK_NAME:-traefik}
|
||||||
|
- traefik.http.routers.${TRAEFIK_ROUTER_NAME:-directus}.rule=Host(`${DIRECTUS_DOMAIN:?err}`)
|
||||||
|
- traefik.http.routers.${TRAEFIK_ROUTER_NAME:-directus}.entrypoints=web
|
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
version: "3.8"
|
version: "3.8"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -33,14 +34,5 @@ services:
|
||||||
DB_USER: ${POSTGRES_USER:?err}
|
DB_USER: ${POSTGRES_USER:?err}
|
||||||
DB_PASSWORD: ${POSTGRES_PASSWORD:?err}
|
DB_PASSWORD: ${POSTGRES_PASSWORD:?err}
|
||||||
|
|
||||||
CACHE_ENABLED: 'true'
|
|
||||||
CACHE_STORE: 'redis'
|
|
||||||
CACHE_REDIS: 'redis://${REDIS_CONTAINER_NAME:-redis}:6379'
|
|
||||||
|
|
||||||
PUID: ${DIRECTUS_PUID:-1000}
|
PUID: ${DIRECTUS_PUID:-1000}
|
||||||
PGID: ${DIRECTUS_PGID:-1000}
|
PGID: ${DIRECTUS_PGID:-1000}
|
||||||
labels:
|
|
||||||
- traefik.enable=true
|
|
||||||
- traefik.docker.network=${TRAEFIK_NETWORK_NAME:-traefik}
|
|
||||||
- traefik.http.routers.${TRAEFIK_ROUTER_NAME:-directus}.rule=Host(`${DIRECTUS_DOMAIN:?err}`)
|
|
||||||
- traefik.http.routers.${TRAEFIK_ROUTER_NAME:-directus}.entrypoints=web
|
|
||||||
|
|
Loading…
Reference in New Issue