-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
77 lines (74 loc) · 1.95 KB
/
docker-compose.yml
File metadata and controls
77 lines (74 loc) · 1.95 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
services:
api:
build:
context: .
dockerfile: api/Dockerfile
container_name: bletrack-api
restart: always
working_dir: /app
env_file:
- .env
environment:
- PYTHONPATH=/app
volumes:
- ~/.ssh/id_ed25519-tunnel.pub:/app/ssh_key.pub
- ~/.ssh/id_ed25519-tunnel:/app/ssh_key
- ~/.ssh/known_hosts:/app/known_hosts
- ./api:/app/api
- ./modules:/app/modules
ports:
- "5055:5055"
depends_on:
mosquitto:
condition: service_started
timescaledb:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://localhost:5055/health')\""]
interval: 15s
timeout: 5s
retries: 5
start_period: 30s
networks:
- ble_net
mosquitto:
image: eclipse-mosquitto:latest
container_name: mosquitto
restart: always
ports:
- "1883:1883" # MQTT Port
- "9001:9001" # Websocket Port
volumes:
- ./mosquitto/config:/mosquitto/config
- ./mosquitto/data:/mosquitto/data
- ./mosquitto/log:/mosquitto/log
networks:
- ble_net
timescaledb:
image: timescale/timescaledb:latest-pg16
container_name: bletrack-timescaledb
restart: always
ports:
- "5433:5432"
env_file:
- .env
environment:
POSTGRES_DB: ${POSTGRES_DB:-bletrack}
POSTGRES_USER: ${POSTGRES_USER:-bletrack}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-bletrack_dev_password}
volumes:
- timescaledb_data:/var/lib/postgresql/data
- ./db/init/timescaledb-init.sql:/docker-entrypoint-initdb.d/001-timescaledb-init.sql:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-bletrack} -d ${POSTGRES_DB:-bletrack}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
networks:
- ble_net
networks:
ble_net:
driver: bridge
volumes:
timescaledb_data: