49 lines
1.6 KiB
YAML
49 lines
1.6 KiB
YAML
# documentation: https://docs.directus.io/self-hosted/quickstart.html
|
|
# slogan: Directus is an open-source tool that wraps custom SQL databases with a dynamic API, and provides an intuitive admin app for managing its content.
|
|
# tags: directus, cms, database, sql
|
|
|
|
services:
|
|
directus:
|
|
image: directus/directus:10.7
|
|
volumes:
|
|
- directus-uploads:/directus/uploads
|
|
- directus-extensions:/directus/extensions
|
|
environment:
|
|
- SERVICE_FQDN_DIRECTUS
|
|
- KEY=$SERVICE_BASE64_64_KEY
|
|
- SECRET=$SERVICE_BASE64_64_SECRET
|
|
- ADMIN_EMAIL=${ADMIN_EMAIL:-admin@example.com}
|
|
- ADMIN_PASSWORD=$SERVICE_PASSWORD_ADMIN
|
|
- DB_CLIENT=postgres
|
|
- DB_HOST=postgresql
|
|
- DB_PORT=5432
|
|
- DB_DATABASE=${POSTGRESQL_DATABASE:-directus}
|
|
- DB_USER=$SERVICE_USER_POSTGRESQL
|
|
- DB_PASSWORD=$SERVICE_PASSWORD_POSTGRESQL
|
|
- REDIS_HOST=redis
|
|
- REDIS_PORT=6379
|
|
- WEBSOCKETS_ENABLED=true
|
|
postgresql:
|
|
image: postgres:16-alpine
|
|
volumes:
|
|
- directus-postgresql-data:/var/lib/postgresql/data
|
|
environment:
|
|
- POSTGRES_USER=${SERVICE_USER_POSTGRESQL}
|
|
- POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRESQL}
|
|
- POSTGRES_DB=${POSTGRESQL_DATABASE:-directus}
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
|
|
interval: 5s
|
|
timeout: 20s
|
|
retries: 10
|
|
redis:
|
|
image: redis:7-alpine
|
|
command: redis-server --appendonly yes
|
|
volumes:
|
|
- directus-redis-data:/data
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 5s
|
|
timeout: 20s
|
|
retries: 10
|