-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
91 lines (84 loc) · 1.94 KB
/
docker-compose.yml
File metadata and controls
91 lines (84 loc) · 1.94 KB
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
version: '3'
services:
database:
image: mysql:8.0.31
container_name: database
restart: always
env_file: .env
environment:
- MYSQL_DATABASE=wordpress
ports:
- "3306:3306"
volumes:
- ./db_data:/var/lib/mysql
command: '--default-authentication-plugin=mysql_native_password'
networks:
- app-network
phpmyadmin:
depends_on:
- database
- traefik
image: phpmyadmin:5.2.0
container_name: phpmyadmin
restart: always
# env_file: .env
ports:
- "3307:80"
environment:
#PMA_HOST: database
#MYSQL_ROOT_PASSWORD: $MYSQL_ROOT_PASSWORD
- PMA_ARBITRARY=1
networks:
- app-network
wordpress:
depends_on:
- database
image: wordpress:6.1.1-fpm-alpine
container_name: wordpress
restart: always
env_file: .env
# ports:
# - "9000:9000"
environment:
- WORDPRESS_DB_HOST=database:3306
- WORDPRESS_DB_USER=$MYSQL_USER
- WORDPRESS_DB_PASSWORD=$MYSQL_PASSWORD
- WORDPRESS_DB_NAME=wordpress
volumes:
- ./wp_data:/var/www/html
networks:
- app-network
webserver:
depends_on:
- wordpress
- traefik
image: nginx:1.23.3-alpine
container_name: webserver
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- ./wp_data:/var/www/html
- ./nginx_conf/default.conf:/etc/nginx/conf.d/default.conf
- ./nginx_conf/certs:/etc/nginx/certs/self-signed
networks:
- app-network
traefik:
image: traefik:v2.9.6
container_name: traefik
command: --api.insecure=true --providers.docker
ports:
- "88:80"
- "8888:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- app-network
volumes:
wp_data:
db_data:
nginx_conf:
networks:
app-network:
# driver: bridge