-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
105 lines (97 loc) · 2.85 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
# https://docs.docker.com/compose/compose-file/
services:
index-web:
container_name: index-web
depends_on:
- index-db
build:
args:
WP_VERSION: ${WP_VERSION}
context: .
networks:
- index-backend
environment:
MYSQL_ROOT_PASSWORD: root
PMA_HOST: index-db
PMA_PORT: 3306
WORDPRESS_CONFIG_EXTRA: |
# Use dispatch port by default
if ('${CODESPACE_NAME:-}') {
define('WP_HOME', 'https://${CODESPACE_NAME:-}-8080.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN:-}');
} else {
define('WP_HOME', 'http://localhost:8080');
define('WP_SITEURL', 'http://localhost:8080');
}
WORDPRESS_DB_HOST: index-db:3306
WORDPRESS_DB_PASSWORD: root
WORDPRESS_DB_USER: root
WORDPRESS_DB_NAME: wordpress
WORDPRESS_USER: root
init: true
ports:
- '8080:80'
restart: on-failure
volumes:
# Apache2 web server configuration
- ./config/web-sites-available:/etc/apache2/sites-available:ro
# CC Legal Tools
# - (assumes the cc-legal-tools-data repository has been cloned next to
# this repository)
- ../cc-legal-tools-data:/var/www/git/cc-legal-tools-data:ro
# Chooser
# - (assumes the chooser repository has been cloned next to this
# repository) this repository)
- ../chooser:/var/www/git/chooser:ro
# FAQ
# - (assumes the faq repository has been cloned next to this repository)
# this repository)
- ../faq:/var/www/git/faq:ro
# Platform Toolkit
# - (assumes the mp repository has been cloned next to this repository)
# this repository)
- ../mp:/var/www/git/mp:ro
# WordPress
- index-wp-data:/var/www/index
# Migration cache
- ./cache:/var/www/index/cache:ro
# Composer files
- ./config/composer/composer.json:/var/www/index/composer.json
- ./config/composer/composer.lock:/var/www/index/composer.lock
index-phpmyadmin:
container_name: index-phpmyadmin
depends_on:
- index-db
environment:
MYSQL_ROOT_PASSWORD: root
PMA_HOST: index-db
PMA_PORT: 3306
# https://hub.docker.com/_/phpmyadmin
image: phpmyadmin
networks:
- index-backend
ports:
- '8003:80'
volumes:
# Apache2 web server configuration
- ./config/phpmyadmin-sites-available:/etc/apache2/sites-available:ro
index-db:
container_name: index-db
environment:
MYSQL_DATABASE: wordpress
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: root
# https://hub.docker.com/_/mariadb
image: mariadb
networks:
- index-backend
restart: on-failure
volumes:
- index-db-data:/var/lib/mysql
volumes:
index-db-data:
name: index-db-data
index-wp-data:
name: index-wp-data
networks:
index-backend:
name: index-backend