File tree Expand file tree Collapse file tree 5 files changed +30
-26
lines changed Expand file tree Collapse file tree 5 files changed +30
-26
lines changed Original file line number Diff line number Diff line change
1
+ WORDPRESS_DB_USER=wpUser
2
+ WORDPRESS_DB_PASSWORD=wpPass
3
+ WORDPRESS_DB_NAME=devWP
4
+ MYSQL_ROOT_PASSWORD=rootPass
Original file line number Diff line number Diff line change 1
1
.env
2
2
src /*
3
3
! src /.gitkeep
4
- db /*
5
- ! db /.gitkeep
4
+ db_data /*
5
+ ! db_data /.gitkeep
6
+ db_dump /*
7
+ ! db_dump /.gitkeep
File renamed without changes.
Original file line number Diff line number Diff line change 1
1
version : ' 3.7'
2
2
3
3
services :
4
+ mariadb :
5
+ image : mariadb:latest
6
+ environment :
7
+ MYSQL_DATABASE : ${WORDPRESS_DB_NAME}
8
+ MYSQL_USER : ${WORDPRESS_DB_USER}
9
+ MYSQL_PASSWORD : ${WORDPRESS_DB_PASSWORD}
10
+ MYSQL_ROOT_PASSWORD : ${MYSQL_ROOT_PASSWORD}
11
+ restart : unless-stopped
12
+ volumes :
13
+ - ./db_data:/var/lib/mysql
14
+ - ./db_dump:/docker-entrypoint-initdb.d
15
+ networks :
16
+ - wordpress-network
4
17
5
18
wordpress :
6
19
image : wordpress
7
- restart : always
20
+ restart : unless-stopped
8
21
ports :
9
- - 8080 :80
22
+ - 8089 :80
10
23
environment :
11
- WORDPRESS_DB_HOST : db
24
+ WORDPRESS_DB_HOST : mariadb
12
25
WORDPRESS_DB_USER : ${WORDPRESS_DB_USER}
13
26
WORDPRESS_DB_PASSWORD : ${WORDPRESS_DB_PASSWORD}
14
27
WORDPRESS_DB_NAME : ${WORDPRESS_DB_NAME}
15
28
volumes :
16
- - wordpress:/var/www/html
17
-
18
- db :
19
- image : mysql:5.7
20
- restart : always
21
- environment :
22
- MYSQL_DATABASE : ${WORDPRESS_DB_NAME}
23
- MYSQL_USER : ${WORDPRESS_DB_USER}
24
- MYSQL_PASSWORD : ${WORDPRESS_DB_PASSWORD}
25
- MYSQL_RANDOM_ROOT_PASSWORD : ${MYSQL_RANDOM_ROOT_PASSWORD}
26
- volumes :
27
- - db:/var/lib/mysql
29
+ - ./src:/var/www/html
30
+ networks :
31
+ - wordpress-network
28
32
29
- volumes :
30
- wordpress :
31
- driver : local
32
- driver_opts :
33
- type : none
34
- device : " ${ROOT_PATH}src"
35
- o : bind
36
- db :
37
-
33
+ networks :
34
+ wordpress-network :
35
+ driver : bridge
You can’t perform that action at this time.
0 commit comments