-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
42 lines (38 loc) · 944 Bytes
/
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
version: '3.9'
services:
mysql_service:
image: "mysql:${MYSQL_VERSION}"
restart: always
ports:
- 3306:3306
environment:
MYSQL_DATABASE: "${DATABASE_NAME}"
MYSQL_USER: "${WORDPRESS_DB_USER}"
MYSQL_PASSWORD: "${WORDPRESS_DB_PASSWORD}"
MYSQL_RANDOM_ROOT_PASSWORD: '1'
volumes:
- .\mysql_vol:/var/lib/mysql
networks:
- wp_network
wordpress_service:
image: "wordpress:${WORDPRESS_VERSION}"
restart: always
ports:
- 8080:80
environment:
WORDPRESS_DB_HOST: mysql_service
WORDPRESS_DB_NAME: "${DATABASE_NAME}"
WORDPRESS_DB_USER: "${WORDPRESS_DB_USER}"
WORDPRESS_DB_PASSWORD: "${WORDPRESS_DB_PASSWORD}"
volumes:
- .\wp_vol:/var/www/html
networks:
- wp_network
depends_on:
- mysql_service
networks:
wp_network:
driver: bridge
volumes:
wp_vol:
mysql_vol: