47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
YAML
---
|
|
version: "3.8"
|
|
|
|
volumes:
|
|
directus:
|
|
name: ${DIRECTUS_VOLUME_NAME:-directus}
|
|
|
|
services:
|
|
directus:
|
|
container_name: ${DIRECTUS_CONTAINER_NAME:-directus}
|
|
image: ${DIRECTUS_IMAGE:-directus/directus:9.4.0}
|
|
restart: always
|
|
volumes:
|
|
- directus:/directus/uploads
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
environment:
|
|
KEY: ${DIRECTUS_KEY:?err}
|
|
SECRET: ${DIRECTUS_SECRET:?err}
|
|
TELEMETRY: false
|
|
|
|
ADMIN_EMAIL: ${DIRECTUS_ADMIN_EMAIL:?err}
|
|
ADMIN_PASSWORD: ${DIRECTUS_ADMIN_PASSWORD:?err}
|
|
PUBLIC_URL: ${DIRECTUS_PUBLIC_URL:?err}
|
|
|
|
DB_CLIENT: 'pg'
|
|
DB_HOST: ${POSTGRES_CONTAINER_NAME:-postgres}
|
|
DB_PORT: '5432'
|
|
DB_DATABASE: ${POSTGRES_DB:?err}
|
|
DB_USER: ${POSTGRES_USER:?err}
|
|
DB_PASSWORD: ${POSTGRES_PASSWORD:?err}
|
|
|
|
CACHE_ENABLED: 'true'
|
|
CACHE_STORE: 'redis'
|
|
CACHE_REDIS: 'redis://${REDIS_CONTAINER_NAME:-redis}:6379'
|
|
|
|
PUID: ${DIRECTUS_PUID:-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
|