-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
85 lines (78 loc) · 1.84 KB
/
docker-compose.prod.yml
File metadata and controls
85 lines (78 loc) · 1.84 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
x-logging: &default-logging
logging:
driver: json-file
options:
max-size: "${LOG_SIZE:-10m}"
max-file: "${LOG_FILES:-3}"
services:
database:
<<: *default-logging
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
deploy:
resources:
limits:
cpus: '${DB_CPUS:-1.0}'
memory: ${DB_MEM_LIMIT:-1024M}
wordpress:
<<: *default-logging
init: true
security_opt:
- no-new-privileges:true
environment:
WORDPRESS_CONFIG_EXTRA: |
define('WP_ENVIRONMENT_TYPE', 'production');
define('DISALLOW_FILE_EDIT', true);
define('DISALLOW_FILE_MODS', true);
volumes:
- ./php/zz-prod.ini:/usr/local/etc/php/conf.d/zz-prod.ini:ro
tmpfs:
- /tmp
deploy:
resources:
limits:
cpus: '${WP_CPUS:-1.0}'
memory: ${WP_MEM_LIMIT:-512M}
nginx:
<<: *default-logging
init: true
security_opt:
- no-new-privileges:true
volumes:
- ./nginx/prod.conf.template:/etc/nginx/templates/default.conf.template:ro
networks:
proxy:
aliases:
- wp-docker-stack-nginx
deploy:
resources:
limits:
cpus: '${NGINX_CPUS:-0.5}'
memory: ${NGINX_MEM_LIMIT:-128M}
wp-init:
<<: *default-logging
restart: "no"
volumes:
- ./scripts:/scripts:ro
deploy:
resources:
limits:
cpus: '${WP_INIT_CPUS:-0.5}'
memory: ${WP_INIT_MEM_LIMIT:-128M}
db-backup:
<<: *default-logging
restart: unless-stopped
volumes:
- ./scripts:/scripts:ro
- db_backups:/backups
deploy:
resources:
limits:
cpus: '${DB_BACKUP_CPUS:-0.5}'
memory: ${DB_BACKUP_MEM_LIMIT:-256M}
volumes:
db_backups:
networks:
proxy:
external: true