-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
46 lines (43 loc) · 1.45 KB
/
docker-compose.yml
File metadata and controls
46 lines (43 loc) · 1.45 KB
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
version: '2'
networks:
wordpress-backend:
external: false
services:
wp-mysql:
image: mysql:${TAG_MYSQL}
container_name: ${WORDPRESS_DB_HOST}
command: '--default-authentication-plugin=mysql_native_password'
volumes:
- ./mysql:/var/lib/mysql
networks:
- wordpress-backend
restart: unless-stopped
# Consider removing the environment section after first launch
# It is not required beyond first launch and poses a security
# risk if left in the .env file
environment:
MYSQL_ROOT_PASSWORD: ${WORDPRESS_DB_ROOT_PASSWORD}
MYSQL_DATABASE: ${WORDPRESS_DB_NAME}
MYSQL_USER: ${WORDPRESS_DB_USER}
MYSQL_PASSWORD: ${WORDPRESS_DB_PASSWORD}
wp:
depends_on:
- wp-mysql
image: wordpress:${TAG_WORDPRESS}
container_name: ${WORDPRESS_WEB_HOST}
volumes:
- ./html:/var/www/html
networks:
- wordpress-backend
ports:
- 80:80
restart: unless-stopped
# Consider removing the environment section after first launch
# It is not required beyond first launch and poses a security
# risk if left in the .env file
environment:
WORDPRESS_DB_HOST: ${WORDPRESS_DB_HOST}:3306
WORDPRESS_DB_NAME: ${WORDPRESS_DB_NAME}
WORDPRESS_DB_USER: ${WORDPRESS_DB_USER}
WORDPRESS_DB_PASSWORD: ${WORDPRESS_DB_PASSWORD}
WORDPRESS_CONFIG_EXTRA: "define('WP_HOME','${WP_HOME}'); define('WP_SITEURL','${WP_SITEURL}');"