-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
executable file
·141 lines (135 loc) · 3.66 KB
/
compose.yml
File metadata and controls
executable file
·141 lines (135 loc) · 3.66 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
services:
postgres_db:
container_name: postgres_db
build:
context: .
dockerfile: ./postgresql/Containerfile
args:
- POSTGRES_IMAGE=${POSTGRES_IMAGE}
restart: unless-stopped
user: "1000"
env_file:
- .env
volumes:
- postgres_data:/var/lib/postgresql
- shared_data:/tmp
- secure_vault:/run/secrets:ro
- ./certs/server.crt:/certs/server.crt:ro
- ./certs/ca.crt:/certs/ca.crt:ro
- ./postgresql/pg_hba.conf:/etc/postgresql/pg_hba.conf:ro
networks:
- MOB_network
command: >
postgres
-c ssl=on
-c ssl_cert_file=/certs/server.crt
-c ssl_key_file=/run/secrets/server_key
-c ssl_ca_file=/certs/ca.crt
-c hba_file=/etc/postgresql/pg_hba.conf
mosquitto_broker:
container_name: mosquitto_broker
build:
context: .
dockerfile: ./mosquitto/Containerfile
args:
- MOSQUITTO_IMAGE=${MOSQUITTO_IMAGE}
restart: unless-stopped
user: "1000"
env_file:
- .env
ports:
- "${MQTT_PORT}:${MQTT_PORT}"
volumes:
- ./mosquitto:/mosquitto/config
- mosquitto_data:/mosquitto/data
- mosquitto_log:/mosquitto/log
- secure_vault:/run/secrets:ro
- ./certs/server.crt:/mosquitto/certs/server.crt:ro
- ./certs/ca.crt:/mosquitto/certs/ca.crt:ro
networks:
- MOB_network
http_db_update_server:
container_name: http_db_update_server
build:
context: .
dockerfile: ./cmd/http_db_update_server/Containerfile
args:
- GO_IMAGE=${GO_IMAGE}
- ALPINE_IMAGE=${ALPINE_IMAGE}
- TARGETARCH=${TARGETARCH}
- WORKDIR=${WORKDIR}
restart: unless-stopped
user: "1000"
depends_on:
- postgres_db
env_file:
- .env
ports:
- "${HTTP_SERVER_PORT}:${HTTP_SERVER_PORT}"
volumes:
- shared_data:/tmp
- secure_vault:/run/secrets:ro
- ./certs/server.crt:${WORKDIR}/certs/server.crt:ro
- ./certs/ca.crt:${WORKDIR}/certs/ca.crt:ro
- ./certs/client.crt:${WORKDIR}/certs/client.crt:ro
networks:
- MOB_network
mqtt_product_api:
container_name: mqtt_product_api
build:
context: .
dockerfile: ./cmd/mqtt_product_api/Containerfile
args:
- GO_IMAGE=${GO_IMAGE}
- ALPINE_IMAGE=${ALPINE_IMAGE}
- TARGETARCH=${TARGETARCH}
- WORKDIR=${WORKDIR}
restart: unless-stopped
user: "1000"
depends_on:
- postgres_db
- mosquitto_broker
env_file:
- .env
volumes:
- secure_vault:/run/secrets:ro
- ./certs/server.crt:${WORKDIR}/certs/server.crt:ro
- ./certs/ca.crt:${WORKDIR}/certs/ca.crt:ro
- ./certs/client.crt:${WORKDIR}/certs/client.crt:ro
networks:
- MOB_network
cli_control_app:
container_name: cli_control_app
build:
context: .
dockerfile: cmd/cli_control_app/Containerfile
args:
- GO_IMAGE=${GO_IMAGE}
- ALPINE_IMAGE=${ALPINE_IMAGE}
- TARGETARCH=${TARGETARCH}
- WORKDIR=${WORKDIR}
stdin_open: true
tty: true
network_mode: host
user: "1000"
volumes:
- secure_vault:/run/secrets:ro
- ./certs:${WORKDIR}/certs:ro
- ${HOST_MDB_DIR}:${CONTAINER_MDB_DIR}:ro
- ${HOST_FIRMWARE_DIR}:${CONTAINER_FIRMWARE_DIR}:ro
env_file:
- .env
environment:
- MQTT_HOST=${MQTT_HOST_IP}
- HTTP_SERVER_HOST=${HTTP_SERVER_IP}
- MDB_FILEPATH=${CONTAINER_MDB_DIR}/${MDB_FILENAME}
- FIRMWARE_FILEPATH=${CONTAINER_FIRMWARE_DIR}/${FIRMWARE_FILENAME}
networks:
MOB_network:
volumes:
postgres_data:
mosquitto_data:
mosquitto_log:
shared_data:
secure_vault:
external: true