-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yml
71 lines (64 loc) · 2.16 KB
/
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
services:
database:
image: mysql:8.1
ports:
- 3306:3306
volumes:
- ./data/database:/var/lib/mysql
- ./docker/mysql/my.cnf:/etc/mysql/conf.d/my.cnf
environment:
MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD}"
MYSQL_USER: "${MYSQL_USER}"
MYSQL_PASSWORD: "${MYSQL_PASSWORD}"
MYSQL_DATABASE: "${MYSQL_DATABASE}"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
cache:
image: redis:6
healthcheck:
test: ["CMD-SHELL", "[ $$(redis-cli ping) = 'PONG' ]"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
directus:
image: directus/directus:11.1.0
ports:
- 8055:8055
volumes:
- ./uploads:/directus/uploads
- ./extensions:/directus/extensions
- ./migrations:/directus/migrations
- ./snapshots:/directus/snapshots
depends_on:
database:
condition: service_healthy
cache:
condition: service_healthy
environment:
SECRET: "${SECRET}"
# Database
DB_CLIENT: "mysql"
DB_HOST: "database"
DB_PORT: "3306"
DB_DATABASE: "${MYSQL_DATABASE}"
DB_USER: "${MYSQL_USER}"
DB_PASSWORD: "${MYSQL_PASSWORD}"
# Cache
CACHE_ENABLED: "true"
CACHE_AUTO_PURGE: "true"
CACHE_STORE: "redis"
REDIS: "redis://cache:6379"
# Directus
ADMIN_EMAIL: "${ADMIN_EMAIL}"
ADMIN_PASSWORD: "${ADMIN_PASSWORD}"
# Make sure to set this in production
# (see https://docs.directus.io/self-hosted/config-options#general)
PUBLIC_URL: "${PUBLIC_URL}"
# Environment variables can also be defined in a file (for example `.env`):
env_file:
- .env