-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
42 lines (42 loc) · 1004 Bytes
/
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
version: '3'
services:
app:
build: .
environment:
DSN: host=db user=postgres password=jqKwlS9vN0mfm1v dbname=iot sslmode=disable
SIGNING_SECRET: SecretYouShouldHide
BROKER: tcp://broker:1883
GOOGLE_APPLICATION_CREDENTIALS: /credentials/credentials.json
depends_on:
db:
condition: service_healthy
volumes:
- ./credentials.json:/credentials/credentials.json
- ./firmware:/firmware
ports:
- "3009:3000"
- "3010:3001"
db:
image: postgres
restart: always
environment:
POSTGRES_DB: iot
POSTGRES_PASSWORD: 'jqKwlS9vN0mfm1v'
ports:
- "5450:5432"
volumes:
- db:/var/lib/mysql
healthcheck:
test: [ "CMD-SHELL", "pg_isready", "-d", "db_prod" ]
interval: 10s
timeout: 60s
retries: 5
broker:
image: eclipse-mosquitto
ports:
- "1883:1883"
- "9001:9001"
volumes:
- ./mosquitto.conf:/mosquitto/config/mosquitto.conf
volumes:
db: