-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
91 lines (84 loc) · 2.64 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
# docker-compose.yml for running a local copy of the WordPress stack
#
# Unlike the real thing, there is no Varnish (but there is phpmyadmin)
#
# This docker-compose.yml file works hand-to-hand with the Makefie,
# which ensures that all required images are built, and code
# repositories are checked out.
#
# docker compose automatically sources the .env file if it exists
# (see https://docs.docker.com/compose/environment-variables/#the-env-file);
# this is what makes the ${VARIABLE} expansions below work.
version: '3'
services:
db:
container_name: wp-db
image: mariadb:10.9.4
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
ports:
- 3306:3306
volumes:
- ./volumes/mariadb:/var/lib/mysql
phpmyadmin:
container_name: wp-pma
image: phpmyadmin/phpmyadmin
environment:
- PMA_ARBITRARY=1
ports:
- ${WP_PORT_PHPMA}:80
volumes:
- /sessions
httpd:
privileged: true
container_name: wp-httpd
build: wp-ops/docker/httpd
labels:
ch.epfl.wordpress.httpd.env: ${WP_ENV}
image: docker-registry.default.svc:5000/wwp-test/httpd
volumes:
# See README.md and Makefile for explanations on volumes
- ./volumes/srv:/srv
# Unlike production, /wp is editable from outside the Docker
# container, and contains the "live" code (in the form of
# Git checkouts; see Makefile)
- ./volumes/wp:/wp
# Certificates are auto-generated when httpd first starts up.
# For comfort, keep them across restarts
- ./volumes/ssl:/etc/apache2/ssl
links:
- db:db
# The `httpd` container only needs to know WP_ENV:
environment:
- WP_ENV=${WP_ENV}
- SMTP_SECRET=${SMTP_SECRET}
ports:
- "${WP_PORT_HTTP}:8080"
- "${WP_PORT_HTTPS}:8443"
mgmt:
container_name: wp-mgmt
labels:
ch.epfl.wordpress.mgmt.env: ${WP_ENV}
image: docker-registry.default.svc:5000/wwp-test/mgmt
build: wp-ops/docker/mgmt
# The `mgmt` container gets access to the entire environment:
env_file:
- .env
environment:
- WP_ENV=${WP_ENV}
- MYSQL_DB_HOST=${MYSQL_DB_HOST}
- MYSQL_SUPER_USER=${MYSQL_SUPER_USER}
- MYSQL_SUPER_PASSWORD=${MYSQL_SUPER_PASSWORD}
volumes:
- ./volumes/srv:/srv
- ./volumes/wp:/wp
- ./volumes/wp/wp-cli/vendor/epfl-si:/var/www/.wp-cli/packages/vendor/epfl-si
- ./volumes/wp/wp-cli/vendor/cortneyray:/var/www/.wp-cli/packages/vendor/cortneyray
- .env:/srv/.env
- ./volumes/usrlocalbin:/usr/local/bin
- ./wp-ops:/wp-ops
ports:
- "${WP_PORT_SSHD}:22"
menu-api:
container_name: menu-api
build: menu-api