forked from agenciavoolu/directus-railway
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
94 lines (85 loc) · 2.64 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
# For local development, you can use the following docker-compose.yml file:
services:
database:
image: postgis/postgis:13-master
# Required when running on platform other than amd64, like Apple M1/M2:
platform: linux/amd64
volumes:
- ./data/database:/var/lib/postgresql/data
environment:
POSTGRES_USER: "directus"
POSTGRES_PASSWORD: "directus"
POSTGRES_DB: "directus"
healthcheck:
test: ["CMD", "pg_isready", "--host=localhost", "--username=directus"]
interval: 10s
timeout: 5s
retries: 5
start_interval: 5s
start_period: 30s
ports:
- 5432:5432
cache:
image: redis:6
healthcheck:
test: ["CMD-SHELL", "[ $$(redis-cli ping) = 'PONG' ]"]
interval: 10s
timeout: 5s
retries: 5
start_interval: 5s
start_period: 30s
directus:
# Build from Dockerfile
build:
context: .
dockerfile: Dockerfile.dev
# Or use the latest version available on Docker Hub.
# image: directus/directus:11
pull_policy: always
ports:
- 8055:8055
volumes:
- ./database:/directus/database
- ./uploads:/directus/uploads
- ./extensions:/directus/extensions
- ./templates:/directus/templates
- ./scripts:/directus/scripts
- ./snapshots:/directus/snapshots
- ./migrations:/directus/migrations
depends_on:
database:
condition: service_healthy
cache:
condition: service_healthy
environment:
KEY: ${KEY}
SECRET: ${SECRET}
DB_CLIENT: ${DB_CLIENT}
DB_HOST: ${DB_HOST}
DB_PORT: ${DB_PORT}
DB_DATABASE: ${DB_DATABASE}
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
CACHE_ENABLED: "true"
CACHE_AUTO_PURGE: "true"
CACHE_STORE: "redis"
REDIS: "redis://cache:6379"
ADMIN_EMAIL: ${ADMIN_EMAIL}
ADMIN_PASSWORD: ${ADMIN_PASSWORD}
STORAGE_LOCATIONS: ${STORAGE_LOCATIONS}
STORAGE_S3_DRIVER: ${STORAGE_S3_DRIVER}
STORAGE_S3_KEY: ${STORAGE_S3_KEY}
STORAGE_S3_SECRET: ${STORAGE_S3_SECRET}
STORAGE_S3_REGION: ${STORAGE_S3_REGION}
STORAGE_S3_BUCKET: ${STORAGE_S3_BUCKET}
STORAGE_S3_ENDPOINT: ${STORAGE_S3_ENDPOINT}
CORS_ENABLED: ${CORS_ENABLED}
CORS_ORIGIN: ${CORS_ORIGIN}
CORS_ALLOWED_HEADERS: ${CORS_ALLOWED_HEADERS}
CORS_EXPOSED_HEADERS: ${CORS_EXPOSED_HEADERS}
CORS_METHODS: ${CORS_METHODS}
WEBSOCKETS_ENABLED: "true"
EXTENSIONS_AUTO_RELOAD: "true"
# Make sure to set this in production
# (see https://docs.directus.io/self-hosted/config-options#general)
# PUBLIC_URL: "https://directus.example.com"