Skip to content

Commit e62c679

Browse files
committed
feat: configure maintenance mode in nginx and update Docker Compose for acore-cms-maintenance service
1 parent a7737cb commit e62c679

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

conf/dist/nginx-conf/wordpress.conf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ server {
22
listen 80;
33
listen 443 ssl;
44

5+
set $maintenance_mode $MAINTENANCE_MODE;
6+
57
root /var/www/html;
68
index index.php;
79

@@ -13,6 +15,10 @@ server {
1315
ssl_certificate /etc/nginx/certs/cert.crt;
1416
ssl_certificate_key /etc/nginx/certs/cert.key;
1517

18+
if ($maintenance_mode = "true") {
19+
try_files /var/www/html/maintenance.html =503;
20+
}
21+
1622
location / {
1723
try_files $uri $uri/ /index.php?$args;
1824
}

docker-compose.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ services:
125125
- "6379"
126126
acore-cms-maintenance:
127127
image: nginx
128+
environment:
129+
DOCKER_CONTAINER: 1
130+
MAINTENANCE_MODE: "true"
128131
volumes:
129132
- ${DOCKER_CONF_NGINX_PATH:-./conf/dist/nginx-conf}:/etc/nginx/conf.d/
130133
- ${DOCKER_CONF_CERTS_PATH:-./conf/dist/certs/}:/etc/nginx/certs/

0 commit comments

Comments
 (0)