Skip to content

Instantly share code, notes, and snippets.

@eXaminator
Last active January 21, 2021 17:58
Show Gist options
  • Save eXaminator/6083092345b4b2c322589cced5d5f8f9 to your computer and use it in GitHub Desktop.
Save eXaminator/6083092345b4b2c322589cced5d5f8f9 to your computer and use it in GitHub Desktop.
version: "3.8"
services:
database:
env_file:
- secrets.env
image: postgres:12
environment:
POSTGRES_DB: directus
POSTGRES_USER: directus
volumes:
- $DATA_PATH/database/data:/var/lib/postgresql/data
restart: unless-stopped
ports:
- 127.0.0.1:5432:5432
cache:
image: redis:6
restart: unless-stopped
storage:
image: minio/minio
command: "server /data"
volumes:
- $DATA_PATH/storage:/data
environment:
MINIO_ACCESS_KEY: <key>
MINIO_SECRET_KEY: <secret>
restart: unless-stopped
networks:
- load-balancer
- default
directus:
image: directus/directus:v9-rc.22
env_file:
- secrets.env
environment:
ACCESS_TOKEN_TTL: 1h
DB_CLIENT: pg
DB_HOST: database
DB_PORT: 5432
DB_USER: directus
DB_DATABASE: directus
CACHE_ENABLED: "false"
CACHE_STORE: "redis"
CACHE_REDIS: "redis://cache:6379"
STORAGE_LOCATIONS: "spaces"
STORAGE_SPACES_DRIVER: "s3"
STORAGE_SPACES_PUBLIC_URL: "https://storage.my-domain.tld"
STORAGE_SPACES_KEY: <key>
STORAGE_SPACES_SECRET: <secret>
STORAGE_SPACES_ENDPOINT: "http://storage:9000"
STORAGE_SPACES_BUCKET: "directus"
STORAGE_SPACES_REGION: "local"
volumes:
- $DATA_PATH/directus/database:/directus/database
- $DATA_PATH/directus/extensions:/directus/extensions
- $DATA_PATH/directus/uploads:/directus/uploads
restart: unless-stopped
networks:
- load-balancer
- default
networks:
load-balancer:
external: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment