File tree Expand file tree Collapse file tree 2 files changed +48
-1
lines changed Expand file tree Collapse file tree 2 files changed +48
-1
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,32 @@ services:
1414 - MYSQL_USER=cypht
1515 - MYSQL_PASSWORD=cypht_password
1616 stop_grace_period : 30s
17+
18+ redis :
19+ image : redis:7-alpine
20+ ports :
21+ - " 6379:6379"
22+ volumes :
23+ - ./data/redis:/data
24+ command : redis-server --appendonly yes
25+ healthcheck :
26+ test : ["CMD", "redis-cli", "ping"]
27+ interval : 10s
28+ timeout : 3s
29+ retries : 5
30+ stop_grace_period : 30s
31+
1732 cypht :
1833 build :
1934 context : .
2035 dockerfile : ./docker/Dockerfile
2136 args :
2237 WITH_DEBUG : true
38+ depends_on :
39+ db :
40+ condition : service_started
41+ redis :
42+ condition : service_healthy
2343 volumes :
2444 - ./data/users:/var/lib/hm3/users
2545 - ./data/attachments:/var/lib/hm3/attachments
@@ -41,6 +61,12 @@ services:
4161 - DB_PASS=cypht_password
4262 - SESSION_TYPE=DB
4363 - USER_CONFIG_TYPE=DB
64+ - ENABLE_REDIS=true
65+ - REDIS_SERVER=redis
66+ - REDIS_PORT=6379
67+ - REDIS_INDEX=1
68+ - REDIS_PASS=
69+ - REDIS_SOCKET=
4470 extra_hosts :
4571 host.docker.internal : host-gateway # for xdebug
4672 stop_grace_period : 30s
Original file line number Diff line number Diff line change @@ -18,11 +18,27 @@ services:
1818 timeout : 5s
1919 retries : 5
2020
21+ redis :
22+ image : redis:7-alpine
23+ ports :
24+ - " 6379:6379"
25+ volumes :
26+ - ./data/redis:/data
27+ command : redis-server --appendonly yes --requirepass ${REDIS_PASSWORD:-}
28+ healthcheck :
29+ test : ["CMD", "redis-cli", "ping"]
30+ interval : 10s
31+ timeout : 3s
32+ retries : 5
33+ restart : unless-stopped
34+
2135 cypht :
2236 image : cypht/cypht:2.4.2
2337 depends_on :
2438 db :
2539 condition : service_healthy
40+ redis :
41+ condition : service_healthy
2642 ports :
2743 - " 80:80"
2844 environment :
@@ -36,9 +52,14 @@ services:
3652 - DB_PASS=cypht_password
3753 - SESSION_TYPE=DB
3854 - USER_CONFIG_TYPE=DB
55+ - ENABLE_REDIS=true
56+ - REDIS_SERVER=redis
57+ - REDIS_PORT=6379
58+ - REDIS_INDEX=1
59+ - REDIS_PASS=
60+ - REDIS_SOCKET=
3961 volumes :
4062 - ./data/log/nginx:/var/log/nginx
4163 - ./data/log/php:/var/log/php
4264 - ./data/log/supervisord:/var/log/supervisord
4365 - ./data/fonts:/usr/local/share/cypht/site/fonts
44-
You can’t perform that action at this time.
0 commit comments