-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
78 lines (71 loc) · 1.97 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
version: "3.5"
services:
web: #production시에는 image로 변경할 것
image: sencom1028/siba-hub-developers:1
restart: always
container_name: hub
ports:
- "3000:3000"
depends_on:
- db
- cache
- mqtt
network_mode: host
privileged: true
volumes:
- ./siba-hub-config.yml://home/node/app/services/siba-hub-config.yml
db:
image: jsurf/rpi-mariadb
restart: always
container_name: maria
network_mode: host
volumes:
#- ./docker/data:/var/lib/maria/data
- ./cont-conf/my.cnf:/usr/local/mysql/my.cnf
- ./sql-scripts:/docker-entrypoint-initdb.d
#healthcheck를 통해 db컨테이너가 제대로 실행되는지 체크
#healthcheck:
# test: "/usr/bin/mysql --user=user --password=user --execute \"SHOW DATABASES;\""
# interval: 3s
# timeout: 1s
# retries: 10
environment:
- MYSQL_ROOT_PASSWORD=admin
- MYSQL_DATABASE=hub_system
- MYSQL_USER=user
- MYSQL_PASSWORD=user
- TZ=Asia/Seoul
ports:
- "3306:3306"
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
cache:
image: arm32v7/redis
restart: always
container_name: redis
network_mode: host
ports:
- "6379:6379"
command: ["redis-server", "/usr/local/etc/redis/redis.conf"]
volumes:
- ./cont-conf/redis.conf:/usr/local/etc/redis/redis.conf
#healthcheck를 통해 redis 컨테이너가 제대로 실행되는지 체크
healthcheck:
test: "exec 3<> /dev/tcp/127.0.0.1/6379 && echo PING >&3 && head -1 <&3 | grep PONG"
timeout: 5s
interval: 5s
retries: 5
mqtt:
image: arm32v6/eclipse-mosquitto
restart: always
hostname: mosquitto
container_name: mosquitto
expose:
- "1883"
- "9001"
ports:
- "1883:1883"
- "9001:9001"
networks:
- default
volumes:
- ./cont-conf/mosquitto.conf:/mosquitto/config/mosquitto.conf