-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.ghcr.yml
140 lines (129 loc) · 2.69 KB
/
docker-compose.ghcr.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
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
version: '3.8'
# Define levels for log file size limits
x-logging-low: &logging-low
driver: "json-file"
options:
max-file: 5
max-size: 5m
x-logging-medium: &logging-medium
driver: "json-file"
options:
max-file: 5
max-size: 10m
x-logging-high: &logging-high
driver: "json-file"
options:
max-file: 5
max-size: 50m
services:
frontend:
image: ghcr.io/n5geh/n5geh.tools.mqtt-gateway/frontend:main
container_name: mqtt_gateway_frontend
env_file:
- .env
ports:
- 5173:5173
networks:
- default
# volumes:
# - ./frontend:/dist # for hot reloading
logging: *logging-medium
api:
image: ghcr.io/n5geh/n5geh.tools.mqtt-gateway/api:main
container_name: mqtt_gateway_api
ports:
- 8000:8000
networks:
- default
# volumes:
# - ./backend/api:/app # for hot reloading
env_file:
- .env
depends_on:
- postgres
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
logging: *logging-medium
gateway:
image: ghcr.io/n5geh/n5geh.tools.mqtt-gateway/gateway:main
networks:
- default
# volumes:
# - ./backend/gateway:/app # for hot reloading
env_file:
- .env
depends_on:
- postgres
deploy:
replicas: 1
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
logging: *logging-medium
postgres:
image: postgres:15.2
hostname: postgres
container_name: postgres
expose:
- "5432"
networks:
- default
ports:
- "5432:5432"
environment:
- POSTGRES_DB=iot_devices
- POSTGRES_USER=admin
- POSTGRES_PASSWORD=postgres
volumes:
- pgdata:/var/lib/postgresql/data
logging: *logging-medium
pgadmin:
image: dpage/pgadmin4:7.1
hostname: pgadmin
container_name: pgadmin
expose:
- "80"
networks:
- default
ports:
- "8080:80"
environment:
- PGADMIN_DEFAULT_PASSWORD=pgadmin
depends_on:
- postgres
healthcheck:
test: curl --fail -s http://localhost:8080 || exit 1
interval: 30s
timeout: 30s
retries: 3
logging: *logging-medium
redis:
image: redis:7.0
hostname: redis
container_name: fiware-redis
expose:
- "6379"
networks:
- default
ports:
- "6379:6379"
healthcheck:
test: redis-cli ping
interval: 30s
timeout: 30s
retries: 3
logging: *logging-medium
volumes:
pgdata:
name: pgdata
networks:
default:
name: fiware
external: true