-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
73 lines (69 loc) · 1.78 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
version: "3.1"
x-base: &base
volumes:
- ./public:/var/www/html
- ./scripts:/var/www/scripts
- ./data:/var/www/data
# Authentication
# passwd/group should be mounted into any container
# needing to share the user/group IDs
# - /etc/group:/etc/group:ro
# - /etc/passwd:/etc/passwd:ro
environment:
# APACHE_DOCUMENT_ROOT: "/var/www/public"
APACHE_RUN_USER: "#${DOCKER_USER}"
APACHE_RUN_GROUP: "#${DOCKER_USER_GROUP}"
WORDPRESS_DB_USER: root
WORDPRESS_DB_PASSWORD: test123
WORDPRESS_DB_NAME: wordpress
WORDPRESS_DB_HOST: mysql
WORDPRESS_DEBUG: true
WORDPRESS_TABLE_PREFIX: wp_
WORDPRESS_CONFIG_EXTRA: |
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
define('SCRIPT_DEBUG', true);
define('WP_DEVELOPMENT_MODE', 'theme');
define('WP_ENVIRONMENT_TYPE', 'local');
define('CF_SMTP', true);
define('CF_SMTP_HOST', 'mail');
define('CF_SMTP_PORT', 1025);
define('WP_SITEURL', 'http://wp.local');
define('WP_HOME', 'http://wp.local');
XDEBUG_CONFIG: ${XDEBUG_CONFIG}
user: "${DOCKER_USER}:${DOCKER_USER_GROUP}"
services:
wordpress:
build:
context: ./dev/wp
dockerfile: Dockerfile
restart: always
ports:
- 80:80
depends_on:
- mysql
<<: *base
mysql:
image: mysql:5.7
restart: always
ports:
- 3306:3306
volumes:
- db-data:/var/lib/mysql
environment:
MYSQL_DATABASE: wordpress
MYSQL_ROOT_PASSWORD: test123
cli:
build:
context: ./dev/cli
dockerfile: Dockerfile
depends_on:
- wordpress
<<: *base
mail:
image: mailhog/mailhog
ports:
- 1025:1025
- 8025:8025
volumes:
db-data: