-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
96 lines (88 loc) · 2.63 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
version: '3.9'
services:
postgres-cms:
profiles: ['cms']
container_name: pg-cms
image: postgres:13
restart: always
volumes:
- cms_db_data:/var/lib/postgresql/data
ports:
- ${LOCAL_POSTGRES_CMS_PORT}:5432
networks:
- directus
environment:
POSTGRES_PASSWORD: ${LOCAL_POSTGRES_PASSWORD}
healthcheck:
test: pg_isready -U "postgres" -d "postgres"
interval: 5s
timeout: 2s
retries: 10
cache:
profiles: ['cms']
container_name: cache
image: redis:6
networks:
- directus
directus:
profiles: ['cms']
container_name: directus
build:
context: ./packages/cms
args:
OIDC_CLIENT_ID: ${DIRECTUS_SIWE_CLIENT_ID}
OIDC_CLIENT_SECRET: ${DIRECTUS_SIWE_CLIENT_SECRET}
OIDC_ISSUER_URL: ${DIRECTUS_SIWE_ISSUER_URL}
ports:
- ${LOCAL_DIRECTUS_PORT}:${LOCAL_DIRECTUS_PORT}
volumes:
# By default, uploads are stored in /directus/uploads
# Always make sure your volumes matches the storage root when using
# local driver
- ./packages/cms/uploads:/directus/uploads
# Make sure to also mount the volume when using SQLite
# - ./database:/directus/database
# If you want to load extensions from the host
#- ./packages/cms/extensions:/directus/extensions
networks:
- directus
depends_on:
cache:
condition: service_started
postgres-cms:
condition: service_healthy
environment:
# Make sure to set these in production
# (see https://docs.directus.io/configuration/config-options/#general)
KEY: ${DIRECTUS_KEY}
SECRET: ${DIRECTUS_SECRET}
PUBLIC_URL: ${DIRECTUS_PUBLIC_URL}
ADMIN_EMAIL: ${DIRECTUS_ADMIN_EMAIL}
ADMIN_PASSWORD: ${DIRECTUS_ADMIN_PASSWORD}
LOG_LEVEL: ${DIRECTUS_LOG_LEVEL}
CORS_ENABLED: true
# DB Settings
DB_CLIENT: 'pg'
DB_HOST: postgres-cms
DB_PORT: ${LOCAL_POSTGRES_PORT}
DB_DATABASE: ${LOCAL_POSTGRES_DATABASE}
DB_USER: ${LOCAL_POSTGRES_USER}
DB_PASSWORD: ${LOCAL_POSTGRES_PASSWORD}
# Cache Settings
CACHE_ENABLED: ${DIRECTUS_CACHE_ENABLED}
CACHE_STORE: 'redis'
REDIS: 'redis://cache:6379'
# Storage
STORAGE_LOCATIONS: 'ipfs'
STORAGE_IPFS_DRIVER: 's3'
STORAGE_IPFS_KEY: ${STORAGE_IPFS_KEY}
STORAGE_IPFS_SECRET: ${STORAGE_IPFS_SECRET}
STORAGE_IPFS_BUCKET: ${STORAGE_IPFS_BUCKET}
STORAGE_IPFS_REGION: ${STORAGE_IPFS_REGION}
STORAGE_IPFS_ENDPOINT: ${STORAGE_IPFS_ENDPOINT}
STORAGE_IPFS_FORCE_PATH_STYLE: true
volumes:
db_data:
cms_db_data:
networks:
directus: