-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
84 lines (79 loc) · 1.8 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
version: "3.0"
services:
web:
build: ./server
container_name: d-anime-mylist-backend-web
hostname: web-server
restart: always
tty: true
volumes:
- ./server/app:/app
environment:
TZ: "${TZ}"
DB_USER_NAME: "${DB_USER_NAME}"
DB_PW: "${DB_USER_PW}"
DB_HOST: "${DB_HOST}"
DB_NAME: "${DB_NAME}"
expose:
- 8000
depends_on:
- db
networks:
- d-anime-mylist-web
- d-anime-mylist-db
nginx:
image: nginx:alpine
container_name: d-anime-mylist-backend-nginx
hostname: nginx-server
depends_on:
- web
ports:
- 80:80
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d
networks:
- d-anime-mylist-web
db:
build: ./db
container_name: d-anime-mylist-backend-db
hostname: db-server
volumes:
- ./db/save_data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: "${DB_ROOT_PW}"
MYSQL_DATABASE: "${DB_NAME}"
MYSQL_USER: "${DB_USER_NAME}"
MYSQL_PASSWORD: "${DB_USER_PW}"
MYSQL_ROOT_HOST: "%"
TZ: "${TZ}"
networks:
- d-anime-mylist-db
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: d-anime-mylist-backend-phpmyadmin
hostname: phpmyadmin-server
environment:
PMA_ARBITRARY: 1
PMA_HOST: db
PMA_USER: "${DB_USER_NAME}"
PMA_PASSWORD: "${DB_USER_PW}"
restart: always
ports:
- 3030:80
depends_on:
- db
networks:
- d-anime-mylist-db
networks:
d-anime-mylist-web:
driver: bridge
ipam:
driver: default
config:
- subnet: 192.168.10.0/24
d-anime-mylist-db:
driver: bridge
ipam:
driver: default
config:
- subnet: 192.168.20.0/24