-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathdocker-compose.full.yml
179 lines (169 loc) · 4.9 KB
/
docker-compose.full.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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
---
version: '3'
services:
traefik:
image: traefik:1.7
command: --web --docker --docker.domain=planet4.test --docker.watch
networks:
proxy:
aliases:
- ${APP_HOSTNAME:-www.planet4.test}
- www.planet4.fnord
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik.toml:/traefik.toml
labels:
traefik.backend: "traefik"
traefik.frontend.rule: "Host:traefik.${APP_HOSTNAME:-www.planet4.test}"
traefik.docker.network: "${COMPOSE_PROJECT_NAME}_proxy"
traefik.enable: "true"
redis:
image: ${REDIS_IMAGE:-redis:4-stretch}
networks:
- local
labels:
traefik.enable: "false"
db:
build:
context: defaultcontent
dockerfile: ../db/Dockerfile
env_file:
- ./db.env
volumes:
- db:/var/lib/mysql
networks:
- db
labels:
traefik.enable: "false"
php-fpm:
image: ${APP_IMAGE:-gcr.io/planet-4-151612/wordpress:main}
depends_on:
- db
- redis
networks:
- local
- db
- proxy
dns:
- ${DNS_RESOLVER:-1.1.1.1}
volumes:
- ./persistence/app:/app/source:cached
- excluded-theme:/app/source/public/wp-content/themes/planet4-master-theme/node_modules/
- excluded-plugin:/app/source/public/wp-content/plugins/planet4-plugin-gutenberg-blocks/node_modules/
- excluded:/app/source/node_modules/
- ./secrets/wp-stateless-media-key.json:/app/secrets/wp-stateless-media-key.json:ro
environment:
- APP_ENV=${APP_ENV:-local}
- APP_HOSTNAME=${APP_HOSTNAME:-www.planet4.test}
- APP_HOSTPATH=${APP_HOSTPATH:-}
# - DELETE_EXISTING_FILES=false
- GIT_REF=${GIT_REF:-main}
- GIT_SOURCE=https://github.com/greenpeace/planet4-base
- INSTALL_APM_AGENT=${INSTALL_APM_AGENT:-false}
# - MERGE_REF=develop
# - MERGE_SOURCE=https://github.com/greenpeace/planet4-flibble
# - OVERWRITE_EXISTING_FILES=false
- WP_FORCE_SSL_ADMIN=false
- WP_REDIS_ENABLED=${WP_REDIS_ENABLED:-true}
- WP_STATELESS_MEDIA_BUCKET=${APP_HOSTNAME:-www-planet4-test}
- WP_STATELESS_MEDIA_ENABLED=${WP_STATELESS_MEDIA_ENABLED:-true}
- WP_VERSION=5.6.2
env_file:
- ./app.env
- ./db.env
labels:
traefik.enable: "false"
openresty:
image: ${OPENRESTY_IMAGE:-gcr.io/planet-4-151612/openresty:main}
depends_on:
- php-fpm
- traefik
- redis
networks:
- local
- proxy
volumes:
- ./persistence/app:/app/source:cached
- excluded-theme:/app/source/public/wp-content/themes/planet4-master-theme/node_modules/
- excluded-plugin:/app/source/public/wp-content/plugins/planet4-plugin-gutenberg-blocks/node_modules/
- excluded:/app/source/node_modules/
environment:
- APP_ENV=${APP_ENV:-develop}
- PAGESPEED_ENABLED=${PAGESPEED_ENABLED:-false}
- APP_HOSTNAME=${APP_HOSTNAME:-www.planet4.test}
- APP_HOSTPATH=${APP_HOSTPATH:-}
- REDIS_FASTCGI_CACHE_ENABLED=true
- PHP_ENABLED=true
labels:
- "traefik.backend=test"
- "traefik.foo.frontend.rule=Host:${APP_HOSTNAME:-www.planet4.test}"
- "traefik.bar.frontend.rule=Host:www.planet4.fnord"
- "traefik.docker.network=${COMPOSE_PROJECT_NAME}_proxy"
- "traefik.enable=true"
phpmyadmin:
image: phpmyadmin/phpmyadmin:4.7
depends_on:
- db
- traefik
environment:
PMA_USER: root
PMA_PASSWORD: root
env_file:
- ./db.env
volumes:
- pma:/sessions
networks:
- db
- proxy
labels:
traefik.backend: "pma"
traefik.frontend.rule: "Host:pma.www.planet4.test"
traefik.docker.network: "${COMPOSE_PROJECT_NAME}_proxy"
traefik.enable: "true"
elasticsearch:
image: gcr.io/planet-4-151612/elasticsearch:${ELASTICSEARCH_BUILD_TAG:-latest}
networks:
- local
environment:
- discovery.type=single-node
labels:
traefik.enable: "false"
elastichq:
image: elastichq/elasticsearch-hq
environment:
HQ_DEFAULT_URL: http://elasticsearch:9200
networks:
- local
ports:
- "5000:5000"
node:
image: ${NODE_IMAGE:-node:16-alpine3.16}
tty: true
networks:
- local
- proxy
dns:
- ${DNS_RESOLVER:-1.1.1.1}
volumes:
- ./persistence/app:/app/source:cached
- excluded-theme:/app/source/public/wp-content/themes/planet4-master-theme/node_modules/
- excluded-plugin:/app/source/public/wp-content/plugins/planet4-plugin-gutenberg-blocks/node_modules/
- excluded:/app/source/node_modules/
environment:
- PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=${PUPPETEER_SKIP_CHROMIUM_DOWNLOAD:-true}
- PUPPETEER_SKIP_DOWNLOAD=${PUPPETEER_SKIP_DOWNLOAD:-true}
networks:
local:
db:
proxy:
driver: bridge
volumes:
db:
pma:
excluded:
excluded-theme:
excluded-plugin: