docker-compose.yml
1.43 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
version: "3"
services:
web:
image: nginx
container_name: nginx
ports:
- "8081:80"
networks:
mynet:
ipv4_address: 172.28.0.2
volumes:
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
- ./web:/var/www/html
restart: on-failure
links:
- app
svelte:
image: node
container_name: svelte
working_dir: /var/www/html
volumes:
- ./web:/var/www/html
command: bash -c "npm install && npm run dev"
restart: on-failure
app:
image: node
container_name: node
ports:
- "8082:80"
networks:
mynet:
ipv4_address: 172.28.0.3
working_dir: /app
volumes:
- ./node:/app
- ./config:/app/config
command: bash -c "npm install && node app.js"
environment:
- NODE_ENV=production
links:
- db
depends_on:
- db
restart: on-failure
db:
image: mariadb:10.2
container_name: mariadb10.2
ports:
- "33066:3306"
networks:
mynet:
ipv4_address: 172.28.0.4
volumes:
- mariadb:/var/lib/mysql
- ./config:/config
environment:
MYSQL_ROOT_PASSWORD_FILE: ./config/db_password.txt
MYSQL_DATABASE: maple
MYSQL_USER: maple
MYSQL_PASSWORD_FILE: ./config/db_password.txt
TZ: Asia/Seoul
command: --character_set_client=utf8 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --character-set-client-handshake=FALSE
restart: on-failure
volumes:
mariadb:
networks:
mynet:
ipam:
driver: default
config:
- subnet: 172.28.0.0/16