-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
79 lines (77 loc) · 1.64 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
services:
nginx:
build:
context: ./nginx
dockerfile: Dockerfile
depends_on:
- php
networks:
- backend
- frontend
ports:
- "80:80"
- "443:443"
restart: unless-stopped
volumes:
- ./wordpress:/app
php:
build:
context: ./php
dockerfile: Dockerfile
container_name: php
depends_on:
mysql:
condition: service_healthy
environment:
WORDPRESS_DB_USER: ${MYSQL_USER}
WORDPRESS_DB_PASSWORD: ${MYSQL_PASSWORD}
WORDPRESS_DB_HOST: ${MYSQL_HOST}
WORDPRESS_DB_NAME: ${MYSQL_DATABASE}
networks:
- backend
restart: unless-stopped
volumes:
- ./wordpress:/app
mysql:
container_name: db
env_file: .env
image: mariadb:latest
healthcheck:
test: mysql ${MYSQL_DATABASE} --user=${MYSQL_USER} --password='${MYSQL_PASSWORD}' --silent --execute "SELECT 1;"
interval: 3s
timeout: 3s
start_period: 60s
retries: 180
networks:
# - frontend
- backend
# ports:
# - "3306:3306"
restart: unless-stopped
volumes:
- mysqldata:/var/lib/mysql
# phpmyadmin:
# container_name: phpmyadmin
# depends_on:
# mysql:
# condition: service_healthy
# environment:
# PMA_HOST: ${MYSQL_HOST}
# PMA_USER: root
# PMA_PASSWORD: ${MYSQL_ROOT_PASSWORD}
# image: phpmyadmin:latest
# networks:
# - frontend
# - backend
# ports:
# - "8080:80"
# restart: unless-stopped
volumes:
mysqldata:
name: wordpress-mysql
networks:
backend:
name: backend
internal: true
frontend:
name: frontend