-
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.5 KB
/
docker-compose.yml
File metadata and controls
63 lines (58 loc) · 1.5 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.9"
services:
postgres:
image: postgres:16
container_name: nurse_postgres
restart: always
environment:
POSTGRES_USER: admin
POSTGRES_PASSWORD: admin_pass
POSTGRES_DB: nurse_db
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
mosquitto:
image: eclipse-mosquitto:2.0
container_name: nurse_mosquitto
restart: always
ports:
- "1883:1883"
- "9001:9001"
volumes:
- ./mosquitto/config:/mosquitto/config:rw
- ./mosquitto/data:/mosquitto/data:rw
- ./mosquitto/log:/mosquitto/log:rw
command: ["/usr/sbin/mosquitto", "-c", "/mosquitto/config/mosquitto.conf"]
backend:
build:
context: ./backend
dockerfile: Dockerfile
depends_on:
- postgres
- mosquitto
environment:
DATABASE_URL: "postgres://admin:admin_pass@postgres:5432/nurse_db"
MQTT_HOST: "mosquitto"
MQTT_PORT: "1883"
MQTT_USER: "username2"
MQTT_PASS: "mosq12665"
JWT_SECRET: "supersecret"
HOST: "0.0.0.0"
PORT: "8080"
ports:
- "8080:8080"
volumes:
- ./frontend/dist:/usr/src/frontend/dist:ro # монтируем собранный фронтенд в backend
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
depends_on:
- backend
ports:
- "5173:80"
volumes:
- ./frontend/dist:/usr/share/nginx/html:ro # для nginx в контейнере фронтенда
volumes:
pgdata: