-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
94 lines (87 loc) · 2.49 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
version: "3"
services:
node-service:
container_name: node-service
build: .
restart: always
ports:
- 8080:8080
volumes:
- .:/usr/src/app
- ./wait-for-it.sh:/usr/src/app/wait-for-it.sh
environment:
- DB_HOST=${DB_HOST}
- DB_USER=${MYSQL_USER}
- DB_PASSWORD=${MYSQL_PASSWORD}
- DB_NAME=${MYSQL_DATABASE}
- DB_PORT=${DB_PORT}
command: ["/usr/src/app/wait-for-it.sh", "db:3306", "--", "npm", "run", "dev"]
nginx:
container_name: nginx
build:
context: ./nginx
dockerfile: Dockerfile
ports:
- 80:80
- 443:443
expose:
- 80
- 443
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
depends_on:
- node-service
prometheus:
image: prom/prometheus:latest
volumes:
- ./monitoring/prometheus.yml:/etc/prometheus/prometheus.yml
command:
["/usr/src/app/wait-for-it.sh", "db:3306", "--", "npm", "run", "dev"]
# prometheus:
# image: prom/prometheus:latest
# volumes:
# - ./monitoring/prometheus.yml:/etc/prometheus/prometheus.yml
# command:
# - "--config.file=/etc/prometheus/prometheus.yml"
# ports:
# - 9090:9090
# depends_on:
# - node-service
# - cadvisor
# grafana:
# image: grafana/grafana:latest
# ports:
# - 3001:3000
# depends_on:
# - prometheus
# volumes:
# - ./monitoring/grafana.ini:/etc/grafana/grafana.ini
# cadvisor:
# image: gcr.io/cadvisor/cadvisor:v0.45.0
# container_name: cadvisor
# privileged: true #컨테이너를 권한 모드로 실행하여 호스트 시스템 리소스에 대한 액세스를 허용합니다. 이걸해야 오류가 안뜨더라구요
# ports:
# - "8081:8080"
# devices:
# - /dev/kmsg:/dev/kmsg
# volumes:
# - /var/run:/var/run:ro
# - /sys:/sys:ro
# - /var/lib/docker/:/var/lib/docker:ro
# - /var/run/docker.sock:/var/run/docker.sock:ro
# - /etc/machine-id:/etc/machine-id:ro
# - /var/lib/dbus/machine-id:/var/lib/dbus/machine-id:ro
# node-exporter:
# image: prom/node-exporter:latest
# container_name: node-exporter
# ports:
# - "9100:9100"
# volumes:
# - /proc:/host/proc:ro
# - /sys:/host/sys:ro
# - /:/rootfs:ro
# command:
# - '--path.procfs=/host/proc'
# - '--path.sysfs=/host/sys'
# - '--collector.filesystem.ignored-mount-points=^/(sys|proc|dev|host|etc)($$|/)'
# restart: always