-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
61 lines (60 loc) · 1.36 KB
/
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
54
55
56
57
58
59
60
61
version: '3.4'
services:
imagehub.api:
image: imagehubapi
container_name: Api
build:
context: .
dockerfile: src\ImageHub.Api\Dockerfile
ports:
- "5000:5000"
- "5001:5001"
depends_on:
imagehub.database:
condition: service_healthy
restart: true
imagehub.rabbitmq:
condition: service_healthy
restart: true
imagehub.database:
image: postgres:15
restart: always
container_name: Database
environment:
- POSTGRES_DB=imagehub-db
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
volumes:
- postgres:/var/lib/postgresql/data
ports:
- 5432:5432
healthcheck:
test: ["CMD", "pg_isready", "-q", "-d", "mydatabase", "-U", "myuser"]
interval: 5s
timeout: 3s
retries: 3
imagehub.rabbitmq:
image: rabbitmq:3-management
container_name: Queue
hostname: imagehub-queue
ports:
- 15672:15672
- 5672:5672
volumes:
- rabbitmqdata:/var/lib/rabbitmq
- rabbitmqlog:/var/log/rabbitmq
environment:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
healthcheck:
test: ["CMD", "rabbitmqctl", "status"]
interval: 10s
timeout: 5s
retries: 3
volumes:
rabbitmqdata:
driver: local
rabbitmqlog:
driver: local
postgres:
driver: local