-
Notifications
You must be signed in to change notification settings - Fork 72
/
Copy pathdocker-compose.yml
141 lines (133 loc) · 3.39 KB
/
docker-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
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
---
services:
dockerproxy:
image: tecnativa/docker-socket-proxy:edge
restart: always
container_name: dockerproxy
networks:
- dockerproxynet
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
LOG_LEVEL: info
# 0 to revoke access / 1 to grant access.
## Granted by Default
EVENTS: 1
PING: 1
VERSION: 1
## Revoked by Default
# Security critical
AUTH: 0
SECRETS: 0
# Not always needed
BUILD: 0
COMMIT: 0
CONFIGS: 0
CONTAINERS: 1 # Traefik, portainer, etc.
DISTRIBUTION: 0
EXEC: 0
IMAGES: 1 # Portainer
INFO: 1 # Portainer
NETWORKS: 1 # Portainer
NODES: 0
PLUGINS: 0
SERVICES: 1 # Portainer
SESSION: 0
SWARM: 0
SYSTEM: 0
TASKS: 1 # Portainer
VOLUMES: 1 # Portainer
TZ: "Europe/Paris"
traefik:
image: traefik:${TRAEFIKVERSION}
restart: unless-stopped
container_name: traefik
networks:
- dockerproxynet
ports:
- target : 80
published : 80
protocol: tcp
mode : host
- target : 443
published : 443
protocol: tcp
mode : host
volumes:
- ./conf/acme.json:/acme.json
- ./conf/traefik.yml:/etc/traefik/traefik.yml:ro
- ./conf/traefikdynamic:/etc/traefik/dynamic:ro
- ./logs/traefik.log:/etc/traefik/applog.log
- /etc/localtime:/etc/localtime:ro
#- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
TZ: "Europe/Paris"
healthcheck:
test: ["CMD", "traefik", "healthcheck", "--ping"]
interval: 10s
timeout: 5s
retries: 3
mem_limit: 256m
mem_reservation: 128m
depends_on:
- dockerproxy
sqlwp:
image: mariadb:${MARIADBVERSION}
restart: unless-stopped
volumes:
- ./conf/custom-mysql.cnf:/etc/mysql/conf.d/custom-mysql.cnf:ro
- /etc/localtime:/etc/localtime:ro
- datasqlwp:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: ${MYSQLROOT}
MYSQL_USER: ${MYSQLUSER}
MYSQL_PASSWORD: ${MYSQLPASSWORD}
MYSQL_DATABASE: ${MYSQLDB}
TZ: "Europe/Paris"
nginxwp:
image: nginx:${NGINXVERSION}
restart: unless-stopped
volumes:
- ./conf/nginx-wp:/etc/nginx:ro
- /etc/localtime:/etc/localtime:ro
- datanginxlogs:/var/log/nginx
- datawp:/var/www/html
links:
- wp
wp:
image: wordpress:${WPVERSION}
restart: unless-stopped
volumes:
- ./conf/php.ini:/usr/local/etc/php/conf.d/custom.ini
- /etc/localtime:/etc/localtime:ro
- datawp:/var/www/html
depends_on:
- sqlwp
- redis
environment:
WORDPRESS_DB_HOST: sqlwp
WORDPRESS_DB_USER: ${MYSQLUSER}
WORDPRESS_DB_PASSWORD: ${MYSQLPASSWORD}
WORDPRESS_DB_NAME: ${MYSQLDB}
WORDPRESS_TABLE_PREFIX: ${MYSQLTABLEPREFIX}
TZ: "Europe/Paris"
redis:
image: redis:${REDISVERSION}
restart: unless-stopped
command: redis-server --maxmemory 1024mb --maxmemory-policy allkeys-lru --requirepass changemeWithALongPassword --appendonly yes --bind redis
environment:
TZ: "Europe/Paris"
volumes:
- /etc/localtime:/etc/localtime:ro
- dataredis:/data
volumes:
datanginxlogs:
dataredis:
datasqlwp:
datawp:
networks:
dockerproxynet:
name: dockerproxynet
ipam:
config:
- subnet: 172.16.10.0/24