-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
101 lines (93 loc) · 2.65 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
version: "3"
services:
wordpress:
container_name: project_creativecommons-wordpress
depends_on:
- database
environment:
WORDPRESS_DB_HOST: database
WORDPRESS_DB_NAME: "${DB_NAME:-wordpress_db}"
WORDPRESS_DB_USER: root
WORDPRESS_DB_PASSWORD: "${DB_ROOT_PASSWORD:-db_password}"
WORDPRESS_CONFIG_EXTRA: |
# Use dispatch port by default
define('WP_HOME', 'http://127.0.0.1:8000');
define('WP_SITEURL', 'http://127.0.0.1:8000');
image: wordpress:latest # https://hub.docker.com/_/wordpress/
networks:
- backend
ports:
- "8000:80"
volumes:
# Apache2 web server configuration
- ./config/wordpress-apache:/etc/apache2/sites-available:ro
# CC Legal Tools
- ./cc-legal-tools-data/docs/:/var/www/legal-tools:ro
# Platform Toolkit
- ./mp/docs:/var/www/platform/toolkit:ro
- wp_data:/var/www/html
phpmyadmin:
container_name: project_creativecommons-phpmyadmin
environment:
PMA_HOST: database
PMA_PORT: 3306
MYSQL_ROOT_PASSWORD: "${DB_ROOT_PASSWORD:-db_password}"
image: phpmyadmin/phpmyadmin
networks:
- backend
ports:
- "8003:80"
database:
build:
# change db if required in .env file
context: ./database/${DATABASE:-mariadb}
container_name: project_creativecommons-database
environment:
MYSQL_DATABASE: "${DB_NAME:-wordpress_db}"
MYSQL_USER: root
MYSQL_ROOT_PASSWORD: "${DB_ROOT_PASSWORD:-db_password}"
networks:
- backend
ports:
- "3306:3306"
volumes:
- db_data:/var/lib/mysql
composer:
# No-op on docker compose up. Instead:
# use `./setup-wordpress.sh`
# or `docker compose run --rm install`
# or `docker compose run --rm update`
command: 'true'
container_name: cc-base-composer
depends_on:
- wordpress
image: composer
restart: "no"
user: www-data
volumes:
- ./composer.json:/var/www/html/composer.json
- ./composer.lock:/var/www/html/composer.lock
- wp_data:/var/www/html
working_dir: /var/www/html/
wordpress-cli:
depends_on:
- database
environment:
WORDPRESS_DB_HOST: database
WORDPRESS_DB_NAME: "${DB_NAME:-wordpress_db}"
WORDPRESS_DB_USER: root
WORDPRESS_DB_PASSWORD: "${DB_ROOT_PASSWORD:-db_password}"
image: wordpress:cli
networks:
- backend
restart: "no"
volumes:
- wp_data:/var/www/html
- ./.env:/var/www/html/.env
- ./setup-wordpress.sh:/var/www/html/setup-wordpress.sh
- ./content-import:/var/www/html/content-import
volumes:
db_data:
wp_data:
networks:
backend: