-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
63 lines (58 loc) · 1.19 KB
/
docker-compose.yml
File metadata and controls
63 lines (58 loc) · 1.19 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
version: '3.8'
services:
mosquitto:
image: eclipse-mosquitto:2.0.18
ports:
- 1883:1883
volumes:
- ./mosquitto/config:/mosquitto/config
- mosquitto-data:/mosquitto/data
- mosquitto-logs:/mosquitto/log
networks:
- mosquitto
api:
build:
context: ./api
depends_on:
- db
restart: on-failure
container_name: api
environment:
- DATABASE_URL=jdbc:postgresql://db:5432/postgres
- DATABASE_USERNAME=postgres
- DATABASE_PASSWORD=postgres
- SPRING_PROFILES_ACTIVE=default
ports:
- "8080:8080"
volumes:
- api-data:/tmp
- api-logs:/var/log
db:
image: postgres:15.5-alpine3.18
restart: unless-stopped
container_name: db
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
ports:
- "5432:5432"
volumes:
- db-data:/var/lib/postgresql/data
volumes:
mosquitto-conf:
driver: local
mosquitto-data:
driver: local
mosquitto-logs:
driver: local
api-data:
driver: local
api-logs:
driver: local
db-data:
driver: local
networks:
mosquitto:
name: mosquitto
driver: bridge