-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
59 lines (55 loc) · 1.52 KB
/
docker-compose.yml
File metadata and controls
59 lines (55 loc) · 1.52 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
services:
api:
image: python:3.11-slim
container_name: bletrack-api
restart: always
working_dir: /app
command: sh -c "pip install --no-cache-dir -r requirements.txt && uvicorn main:app --host 0.0.0.0 --port 5055"
env_file:
- .env
environment:
MQTT_BROKER: mosquitto
MQTT_PORT: 1883
DATABASE_URL: postgresql://${POSTGRES_USER:-bletrack}:${POSTGRES_PASSWORD:-bletrack_dev_password}@timescaledb:5432/${POSTGRES_DB:-bletrack}
volumes:
- ./:/app
ports:
- "5055:5055"
depends_on:
- mosquitto
- timescaledb
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"
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
- ./timescaledb-init.sql:/docker-entrypoint-initdb.d/001-timescaledb-init.sql:ro
networks:
- ble_net
networks:
ble_net:
driver: bridge
volumes:
timescaledb_data: