-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
94 lines (88 loc) · 2.25 KB
/
docker-compose.yml
File metadata and controls
94 lines (88 loc) · 2.25 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
92
93
94
services:
postgres:
image: timescale/timescaledb:latest-pg17
container_name: iot-postgres
restart: unless-stopped
environment:
POSTGRES_USER: iot
POSTGRES_PASSWORD: iotpassword
POSTGRES_DB: iotdb
volumes:
- ./backend/postgres/data:/var/lib/postgresql/data
networks:
- iot
ports:
- "5433:5432"
emqx:
image: emqx:5.7
container_name: emqx
restart: unless-stopped
environment:
EMQX_NODE__NAME: "emqx@emqx"
EMQX_DASHBOARD__DEFAULT_USERNAME: admin
EMQX_DASHBOARD__DEFAULT_PASSWORD: emqx123
ulimits:
nofile:
soft: 1000000
hard: 1000000
volumes:
- ./backend/emqx/data:/opt/emqx/data
- ./backend/emqx/log:/opt/emqx/log
- /mnt/caddy-mqtt-cert/event.techsavvylab.com.crt:/opt/emqx/etc/certs/cert.pem:ro
- /mnt/caddy-mqtt-cert/event.techsavvylab.com.key:/opt/emqx/etc/certs/key.pem:ro
- /mnt/caddy-mqtt-cert/event.techsavvylab.com.crt:/opt/emqx/etc/certs/cacert.pem:ro
networks:
- iot
ports:
- "1883:1883"
- "8083:8083"
- "8883:8883"
- "18083:18083"
backend:
build: ./backend/app
# image: node:20
container_name: iot-backend
restart: unless-stopped
environment:
DATABASE_URL: postgresql://iot:iotpassword@postgres:5432/iotdb
MQTT_HOST: emqx
MQTT_PORT: 1883
# FIX FOR DOCKER RELOAD:
CHOKIDAR_USEPOLLING: "true"
CHOKIDAR_INTERVAL: 300
env_file:
- ./.env
command: >
sh -c "
npm install -g nodemon &&
nodemon --legacy-watch src/server.js
"
volumes:
- ./backend/app:/app
- /app/node_modules
depends_on:
- postgres
- emqx
networks:
- iot
ports:
- "8086:8081"
#Live FE
iot-frontend:
image: node:20.19-bookworm
working_dir: /usr/src/app
volumes:
- /home/shaikat21/iot-platform/iot-frontend:/usr/src/app
- container-cache:/usr/src/app/.angular/cache-host
- /usr/src/app/node_modules
command: sh -c "npm ci --no-audit --no-fund && npx ng serve --host 0.0.0.0 --port 4200"
ports:
- "4204:4200"
restart: unless-stopped
networks:
iot:
volumes:
iot_pg_data:
emqx_data:
emqx_log:
container-cache: