-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
79 lines (74 loc) · 1.59 KB
/
docker-compose.yml
File metadata and controls
79 lines (74 loc) · 1.59 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
version: "3.9"
services:
postgres:
image: postgres:17.4
restart: always
env_file:
- ./backend/.env
environment:
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_DB: ${DATABASE_NAME}
ports:
- 5432:5432
volumes:
- pgdata:/var/lib/postgresql/data
networks:
- app-network
rabbitmq:
image: rabbitmq:3.13-management
container_name: rabbitmq
restart: always
ports:
- "5672:5672"
- "15672:15672"
environment:
RABBITMQ_DEFAULT_USER: admin
RABBITMQ_DEFAULT_PASS: admin123
volumes:
- rabbitmq_data:/var/lib/rabbitmq
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
networks:
- app-network
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: nest-backend
ports:
- 3000:3000
env_file:
- ./backend/.env
depends_on:
rabbitmq:
condition: service_healthy
postgres:
condition: service_started
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3000/health"]
interval: 10s
timeout: 5s
retries: 3
networks:
- app-network
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: vue-frontend
ports:
- 8080:80
depends_on:
- backend
networks:
- app-network
volumes:
pgdata:
rabbitmq_data:
networks:
app-network:
driver: bridge