-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
103 lines (99 loc) · 3.02 KB
/
docker-compose.yml
File metadata and controls
103 lines (99 loc) · 3.02 KB
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
97
98
99
100
101
102
103
services:
redis:
container_name: ${CONTAINER_NAME_PREFIX}-redis
image: redis:7-alpine
restart: unless-stopped
volumes:
- ./redis:/data
command: >
redis-server
--maxmemory 256mb
--maxmemory-policy allkeys-lru
--save ""
--tcp-backlog 128
--timeout 300
--tcp-keepalive 60
--databases 1
--hz 10
--loglevel warning
--client-output-buffer-limit "normal 0 0 0"
--stop-writes-on-bgsave-error no
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 1s
retries: 5
start_period: 15s
networks:
- default
ghost:
container_name: ${CONTAINER_NAME_PREFIX}-ghost
image: ghost:latest
build: .
restart: unless-stopped
depends_on:
redis:
condition: service_healthy
env_file:
- .env
environment:
NODE_ENV: production
url: http://${HOSTNAME}
# Mail
mail__transport: ${GHOST_MAIL_TRANSPORT}
mail__from: ${GHOST_MAIL_FROM}
mail__options__service: ${GHOST_MAIL_SERVICE}
mail__options__host: ${GHOST_MAIL_HOST}
mail__options__port: ${GHOST_MAIL_PORT}
mail__options__auth__user: ${GHOST_MAIL_USER}
mail__options__auth__pass: ${GHOST_MAIL_PASS}
# Redis-Cache
cache__type: ${GHOST_CACHE_TYPE}
cache__redis__host: ${GHOST_CACHE_REDIS_HOST}
cache__redis__port: ${GHOST_CACHE_REDIS_PORT}
cache__redis__db: ${GHOST_CACHE_REDIS_DB}
cache__redis__keyPrefix: ${GHOST_CACHE_REDIS_KEYPREFIX}
cache__redis__ttl: ${GHOST_CACHE_REDIS_TTL}
cache__redis__reuseConnection: ${GHOST_CACHE_REDIS_REUSECONNECTION}
cache__redis__refreshAheadFactor: ${GHOST_CACHE_REDIS_REFRESHAHEADFACTOR}
cache__redis__getTimeoutMilliseconds: ${GHOST_CACHE_REDIS_GETTIMEOUTMS}
cache__redis__storeConfig__retryConnectSeconds: ${GHOST_CACHE_REDIS_RETRYCONNECTSECONDS}
cache__redis__storeConfig__lazyConnect: ${GHOST_CACHE_REDIS_LAZYCONNECT}
cache__redis__storeConfig__enableOfflineQueue: ${GHOST_CACHE_REDIS_ENABLEOFFLINEQUEUE}
cache__redis__storeConfig__maxRetriesPerRequest: ${GHOST_CACHE_REDIS_MAXRETRIES}
volumes:
- ./content:/var/lib/ghost/content
- ./bootstrap:/var/lib/ghost/content/bootstrap
- ./config.production.json:/var/lib/ghost/config.production.json:ro
networks:
- default
healthcheck:
test: timeout 10s bash -c ':> /dev/tcp/127.0.0.1/2368' || exit 1
interval: 10s
timeout: 5s
retries: 3
start_period: 90s
nginx:
container_name: ${CONTAINER_NAME_PREFIX}-nginx
image: nginx:alpine
restart: unless-stopped
depends_on:
ghost:
condition: service_healthy
ports:
- "80:80"
volumes:
- ./nginx-proxy.conf:/etc/nginx/nginx.conf:ro
- nginx-cache:/var/cache/nginx
networks:
- default
healthcheck:
test: ["CMD", "nginx", "-t"]
interval: 60s
retries: 5
start_period: 20s
volumes:
nginx-cache:
networks:
default:
driver: bridge