-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
122 lines (116 loc) · 3.06 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
version: '3'
services:
wp:
# https://hub.docker.com/_/wordpress/
# image: wordpress:6.1.1:latest
image: wordpress:5.6.0-php7.2
# image: wordpress:5.9.2-php7.3
# image: wordpress:6.1.1-php7.4
# image: wordpress:6.1.1-php8.0
# image: wordpress:6.1.1-php8.1
# image: wordpress:6.1.1-php8.2
ports:
- ${IP}:80:80 # change ip if required
volumes:
- ./config/php.conf.ini:/usr/local/etc/php/conf.d/conf.ini
- wp_app:/var/www/html # Full wordpress project
- ./yesticket/:/var/www/html/wp-content/plugins/yesticket # Plugin development
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_NAME: "${DB_NAME}"
WORDPRESS_DB_USER: "${DB_USER}"
WORDPRESS_DB_PASSWORD: "${DB_PASSWORD}"
WORDPRESS_DEBUG: true
deploy:
resources:
limits:
cpus: '0.5'
memory: 1G
reservations:
cpus: '0.1'
memory: 500M
networks:
- development
depends_on:
db:
condition: service_healthy
links:
- db
wpcli:
image: wordpress:cli
volumes:
- ./config/php.conf.ini:/usr/local/etc/php/conf.d/conf.ini
- ./bin/install-wp.sh:/usr/local/bin/install-wp.sh
- wp_app:/var/www/html
- ./yesticket/:/var/www/html/wp-content/plugins/yesticket # Plugin development
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_NAME: "${DB_NAME}"
WORDPRESS_DB_USER: "${DB_USER}"
WORDPRESS_DB_PASSWORD: "${DB_PASSWORD}"
WP_USER: "${WP_USER}"
WP_USER_PW: "${WP_USER_PW}"
YESTICKET_ORGANIZER_ID: "${YESTICKET_ORGANIZER_ID}"
YESTICKET_KEY: "${YESTICKET_KEY}"
deploy:
resources:
limits:
cpus: '0.5'
memory: 500M
reservations:
cpus: '0.01'
memory: 50M
networks:
- development
depends_on:
db:
condition: service_healthy
wp:
condition: service_started
# pma:
# image: phpmyadmin/phpmyadmin
# environment:
# # https://docs.phpmyadmin.net/en/latest/setup.html#docker-environment-variables
# PMA_HOST: db
# PMA_PORT: 3306
# MYSQL_ROOT_PASSWORD: "${DB_ROOT_PASSWORD}" #user will be 'root'
# UPLOAD_LIMIT: 50M
# networks:
# - development
# ports:
# - ${IP}:8080:80
# links:
# - db:db
db:
image: "mariadb:10.9"
volumes:
- ./wp-data:/docker-entrypoint-initdb.d
- db_data:/var/lib/mysql
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_DATABASE: "${DB_NAME}"
MYSQL_ROOT_PASSWORD: "${DB_ROOT_PASSWORD}"
MYSQL_USER: "${DB_USER}"
MYSQL_PASSWORD: "${DB_PASSWORD}"
deploy:
resources:
limits:
cpus: '0.2'
memory: 300M
reservations:
cpus: '0.01'
memory: 100M
networks:
- development
healthcheck:
test: "healthcheck.sh --no-defaults || exit 1"
interval: 5s
timeout: 2s
retries: 3
start_period: 10s
volumes:
wp_app:
db_data:
networks:
development:
name: yesticket_development