-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
81 lines (78 loc) · 1.84 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
services:
server:
platform: linux/amd64
image: nginx:1.19.10-alpine
container_name: ${NAME}-server
depends_on:
- wp
ports:
- 80:80
- 443:443
volumes:
- ./public:/var/www/html
- ./proxy/conf/nginx.conf:/etc/nginx/nginx.conf
- ./proxy/certs:/etc/nginx/certs
networks:
- wpsite
db:
platform: linux/amd64
image: mysql:8.0
container_name: ${NAME}-db
restart: always
environment:
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_RANDOM_ROOT_PASSWORD: '1'
volumes:
- db:/var/lib/mysql
networks:
- wpsite
wp:
platform: linux/amd64
container_name: ${NAME}-wp
depends_on:
- db
build: .
restart: always
ports:
- 8080:80
environment:
WORDPRESS_DB_HOST: ${NAME}-db:3306
WORDPRESS_DB_USER: ${DB_USER}
WORDPRESS_DB_PASSWORD: ${DB_PASSWORD}
WORDPRESS_DB_NAME: ${DB_NAME}
WORDPRESS_CONFIG_EXTRA: define('WP_ALLOW_MULTISITE', true);
DOCKER_DEV: docker_dev
volumes: [ './public/:/var/www/html' ]
hostname: wp-dev.ucsc
labels:
com.ucsc.expose.domain: "wp-dev.ucsc"
com.ucsc.expose.domainIsHost: "true"
com.ucsc.expose.subdomainHosts: "site1 site2 site3"
networks:
wpsite:
aliases:
- wp-dev.ucsc
wpcli:
platform: linux/amd64
image: wordpress:cli-php8.1
container_name: ${NAME}-cli
depends_on:
- wp
user: 1000:1000
command: tail -f /dev/null
volumes: [ './public/:/var/www/html' ]
environment:
WORDPRESS_DB_HOST: ${NAME}-db:3306
WORDPRESS_DB_USER: ${DB_USER}
WORDPRESS_DB_PASSWORD: ${DB_PASSWORD}
WORDPRESS_DB_NAME: ${DB_NAME}
networks:
- wpsite
networks:
wpsite:
driver: bridge
volumes:
wp: null
db: null