Created
December 13, 2019 00:39
-
-
Save casey-chow/8a8ab27142bb51904829028f46bf01b2 to your computer and use it in GitHub Desktop.
Directus with SSL and Google Cloud Storage (via Minio)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
directus: | |
image: directus/directus:v8.2.0-apache | |
environment: | |
# App | |
DIRECTUS_APP_ENV: "production" | |
DIRECTUS_APP_TIMEZONE: "America/Los_Angeles" | |
# These are now required, make sure to always set | |
# to something unique while in production | |
DIRECTUS_AUTH_PUBLICKEY: "" | |
DIRECTUS_AUTH_SECRETKEY: "" | |
# Database | |
DIRECTUS_DATABASE_HOST: "" | |
DIRECTUS_DATABASE_PORT: "3306" | |
DIRECTUS_DATABASE_NAME: "" | |
DIRECTUS_DATABASE_USERNAME: "" | |
DIRECTUS_DATABASE_PASSWORD: "" | |
# Storage | |
DIRECTUS_STORAGE_ADAPTER: "s3" | |
DIRECTUS_STORAGE_ROOT: "/content/originals" | |
DIRECTUS_STORAGE_ROOTURL: "https://storage.googleapis.com/<bucket-name>/content/originals" | |
DIRECTUS_STORAGE_THUMBROOT: "/content/thumbnails" | |
DIRECTUS_STORAGE_KEY: "<some-key>" | |
DIRECTUS_STORAGE_VERSION: "latest" | |
DIRECTUS_STORAGE_SECRET: "<some-secret>" | |
DIRECTUS_STORAGE_REGION: "" | |
DIRECTUS_STORAGE_BUCKET: "<bucket-name>" | |
DIRECTUS_STORAGE_ENDPOINT: "http://minio:9000" # minio exposes itself on port 9000 | |
# Proxy | |
VIRTUAL_HOST: "example.com" | |
LETSENCRYPT_HOST: "example.com" | |
restart: unless-stopped | |
# Minio is used as a compatibility layer between S3 and GCS. We're only | |
# using it for Directus here though, and retrieve the file through GCS itself. | |
minio: | |
image: minio/minio | |
command: gateway gcs <project-name> | |
environment: | |
GOOGLE_APPLICATION_CREDENTIALS: "/credentials.json" | |
MINIO_ACCESS_KEY: "<some-key>" | |
MINIO_SECRET_KEY: "<some-secret>" | |
volumes: | |
- ./credentials.json:/credentials.json | |
nginx-proxy: | |
image: jwilder/nginx-proxy | |
ports: | |
- "80:80" | |
- "443:443" | |
volumes: | |
- /etc/nginx/certs | |
- /etc/nginx/vhost.d | |
- /usr/share/nginx/html | |
- /var/run/docker.sock:/tmp/docker.sock:ro | |
restart: unless-stopped | |
nginx-proxy-letsencrypt: | |
image: jrcs/letsencrypt-nginx-proxy-companion | |
environment: | |
DEFAULT_EMAIL: [email protected] | |
volumes_from: | |
- nginx-proxy | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock:ro | |
restart: unless-stopped |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment