-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.production.yaml
More file actions
73 lines (68 loc) · 1.8 KB
/
Copy pathdocker-compose.production.yaml
File metadata and controls
73 lines (68 loc) · 1.8 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
# https://docs.docker.com/compose/compose-file/build/
# https://squash.io/tutorial-host-network-in-docker-compose/
services:
# DO NOT REMOVE THIS COMMENT https://github.com/sukesh-ak/setup-mosquitto-with-docker?tab=readme-ov-file
# mqtt5 eclipse-mosquitto
mqtt:
image: eclipse-mosquitto
container_name: mqtt
ports:
- "1883:1883" #default mqtt port
- "9001:9001" #default mqtt port for websockets
volumes:
- ./infrastructure/MqttBroker/config:/mosquitto/config:rw
- ./infrastructure/MqttBroker/data:/mosquitto/data:rw
- ./infrastructure/MqttBroker/log:/mosquitto/log:rw
restart: unless-stopped
# reverse proxy
nginx:
build:
context: ./infrastructure/ReverseProxy
dockerfile: Dockerfile
container_name: nginx
restart: unless-stopped
depends_on:
- ui
ports:
- 80:80
- 443:443
# - 9002:9002
# - 1884:1884
volumes:
- ./infrastructure/ReverseProxy/conf.d:/etc/nginx/conf.d/:rw,cached
- ./infrastructure/ReverseProxy/nginx.conf:/etc/nginx/nginx.conf:rw,cached
- ./infrastructure/ReverseProxy/certs:/etc/nginx/certs
- ./infrastructure/ReverseProxy/data:/data
# ui app node.js
ui:
container_name: ui
build:
context: ./apps/ui
target: prod
restart: unless-stopped
depends_on:
- mqtt
ports:
- 3000:3000
volumes:
- ./apps/ui:/app:rw,cached
env_file:
- ./env.d/production/.env_ui
# server app node.js
server:
container_name: server
build:
context: ./apps/server
target: prod
depends_on:
- mqtt
restart: unless-stopped
network_mode: host
volumes:
- ./apps/server:/app:rw,cached
- /sys:/sys
- /dev:/dev
env_file:
- ./env.d/production/.env_server
networks:
default: