-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
95 lines (87 loc) · 2.21 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
version: "3"
services:
wordpress:
image: "wordpress:${WP_VERSION:-5.2.1}-php${PHP_VERSION:-7.3}-apache"
# image: "wordpress:latest"
environment:
# VIRTUAL_HOST: "localhost"
VIRTUAL_HOST: "${DOCKER_DEV_DOMAIN:-localhost}"
WORDPRESS_DB_HOST: "db:3306"
WORDPRESS_DB_NAME: "wordpress"
WORDPRESS_DB_PASSWORD: "wordpress"
WORDPRESS_DB_USER: "wordpress"
depends_on:
- "db"
networks:
- "front"
- "back"
volumes:
- "./wp/:/var/www/html/" ## needed for permissions or we won't be able to update WP
- "./woocommerce-price-ajax:/var/www/html/wp-content/plugins/woocommerce-price-ajax:rw"
- "./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini"
# php:
# build:
# context: .
# args:
# - WITH_XDEBUG=true
# env_file: .env
# volumes:
# - .:/var/www/app:rw
wp-cli:
image: "wordpress:cli-${WP_CLI_VERSION:-2.2.0}-php${PHP_VERSION:-7.3}"
environment:
- APACHE_RUN_USER="www-data"
- APACHE_RUN_GROUP="www-data"
depends_on:
- "db"
networks:
- "back"
volumes:
- "./wp:/var/www/html:rw"
- "./bin/install-wp.sh:/usr/local/bin/install-wp:rw"
- "./woocommerce-price-ajax:/var/www/html/wp-content/plugins/woocommerce-price-ajax:rw"
db:
image: "mariadb:10.2"
environment:
MYSQL_ROOT_PASSWORD: wordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
volumes:
- "./db_data:/var/lib/mysql"
networks:
- "back"
proxy:
image: "jwilder/nginx-proxy:alpine"
ports:
- "80:80"
networks:
front:
aliases:
- "${DOCKER_DEV_DOMAIN:-localhost}"
# - "localhost"
volumes:
- "/var/run/docker.sock:/tmp/docker.sock:ro"
# phpmyadmin:
# image: phpmyadmin/phpmyadmin:latest
# links:
# - db:mysql
# ports:
# - "8181:80"
# networks:
# - "back"
# environment:
# MYSQL_USERNAME: wordpress
# MYSQL_PORT_3306_TCP_ADDR: db
# MYSQL_ROOT_PASSWORD: wordpress
# composer:
## restart: 'always'
# image: library/composer:latest
# command: install
# volumes:
# - .:/app
networks:
front: {}
back: {}
volumes:
wp: {}