forked from liamcottle/meshtastic-map
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yaml
89 lines (84 loc) · 1.95 KB
/
docker-compose.dev.yaml
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
services:
# runs the frontend
app:
container_name: app
build:
context: app
dockerfile: Dockerfile.dev
depends_on:
api:
condition: service_healthy
mqtt:
condition: service_started
ports:
- 8080:80
volumes:
- ./app:/app
# runs the api
api:
container_name: api
build:
context: api
dockerfile: Dockerfile.dev
depends_on:
database:
condition: service_healthy
ports:
- 8081:80
environment:
DATABASE_URL: "mysql://root:password@database:3306/meshtastic-map?connection_limit=100"
volumes:
- ./api:/app
- ./prisma:/app/prisma
# listens to mqtt packets and saves to database
mqtt:
container_name: mqtt
build:
context: mqtt
dockerfile: Dockerfile.dev
depends_on:
database:
condition: service_healthy
environment:
DATABASE_URL: "mysql://root:password@database:3306/meshtastic-map?connection_limit=100"
volumes:
- ./mqtt:/app
- ./prisma:/app/prisma
# runs the database to store everything from mqtt
database:
container_name: database
image: bitnami/mariadb
environment:
MARIADB_DATABASE: "meshtastic-map"
MARIADB_ROOT_PASSWORD: "password"
ports:
- 3306:3306/tcp
volumes:
- database_data:/bitnami/mariadb
healthcheck:
test: ["CMD", "/opt/bitnami/scripts/mariadb/healthcheck.sh"]
interval: 10s
timeout: 5s
retries: 6
start_interval: 5s
proxy:
container_name: proxy
image: nginx:alpine
depends_on:
app:
condition: service_healthy
api:
condition: service_healthy
ports:
- 80:80
volumes:
- ./nginx.dev.conf:/etc/nginx/nginx.conf:ro
healthcheck:
test:
["CMD-SHELL", "wget -O- http://localhost/nginx/healthcheck || exit 1"]
interval: 10s
timeout: 5s
retries: 6
start_interval: 5s
volumes:
database_data: