-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
executable file
·57 lines (57 loc) · 1.41 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
services:
db:
container_name: wp_db
# We use a mariadb image which supports both amd64 & arm64 architecture
image: mariadb:10.6.4-focal
# If you really want to use MySQL, uncomment the following line
#image: mysql:8.0.27
command: '--default-authentication-plugin=mysql_native_password'
volumes:
- wp_db_data:/var/lib/mysql
restart: always
environment:
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
- MYSQL_USER=${DB_USER}
- MYSQL_PASSWORD=${DB_PASSWORD}
- MYSQL_DATABASE=${DB_NAME}
expose:
- 3306
- ${DB_PORT}
networks:
- webnet
adminer:
container_name: wp_adminer
image: adminer:latest
command: php -S 0.0.0.0:8080 -t /var/www/html # Fix "getaddrinfo failed: Name does not resolve"
restart: always
ports:
- ${ADMINER_PORT}:8080
networks:
- webnet
depends_on:
- db
wordpress:
container_name: wp_web
build:
context: .
dockerfile: ./Dockerfile
ports:
- ${WEB_PORT}:80
restart: always
volumes:
- ./:/var/www/html/wp-content/plugins/oms-coupon
environment:
- WORDPRESS_DB_HOST=db
- WORDPRESS_DB_USER=${DB_USER}
- WORDPRESS_DB_PASSWORD=${DB_PASSWORD}
- WORDPRESS_DB_NAME=${DB_NAME}
- WORDPRESS_DEBUG=${WP_DEBUG}
depends_on:
- db
networks:
- webnet
volumes:
wp_db_data:
networks:
webnet:
name: wp_webnet