-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
53 lines (49 loc) · 1016 Bytes
/
docker-compose.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
version: '3.5'
services:
db:
image: postgres
restart: always
environment:
- POSTGRES_USER=maksim
- POSTGRES_PASSWORD=postgres
container_name: postgres
volumes:
- dbapp:/var/lib/postgresql/data
- ./initdb/init.sql:/docker-entrypoint-initdb.d/db.sql:ro
ports:
- '5432:5432'
rabbitmq:
image: rabbitmq:3.9-management
container_name: rabbitmq
restart: always
hostname: rabbitmq
ports:
- 5672:5672
- 15672:15672
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:15672']
interval: 30s
timeout: 10s
retries: 5
volumes:
- rabbitmq_data:/var/lib/rabbitmq
app:
build:
context: .
dockerfile: Dockerfile
container_name: nest-docker-postgres
restart: on-failure
env_file:
- .env
ports:
- '3000:3000'
depends_on:
- db
- rabbitmq
links:
- rabbitmq
volumes:
- ./src:/app/src
volumes:
dbapp:
rabbitmq_data: