-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdocker-compose.yml
100 lines (92 loc) · 2.44 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
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
version: '3'
services:
gt-rabbitmq:
image: rabbitmq:3-management-alpine
profiles: [ "develop","standalone","test" ]
container_name: gt-rabbitmq
volumes:
- rabbitmq_gt_data:/var/lib/rabbitmq/
- rabbitmq_gt_log:/var/log/rabbitmq/
environment:
- RABBITMQ_DEFAULT_USER=${RABBITMQ_USER}
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_PASSWORD}
env_file:
- .env
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 30s
timeout: 30s
retries: 3
gt-vault-db:
profiles: [ "develop","standalone","test" ]
container_name: gt-vault-db
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
env_file:
- .env
build:
context: ./db
dockerfile: Dockerfile
volumes:
- postgres_gt_data:/var/lib/postgresql/data
healthcheck:
test:
[
"CMD-SHELL", "pg_isready -d $POSTGRES_DB -U $POSTGRES_USER"
]
interval: 5s
timeout: 5s
retries: 5
gt-goblin-worker:
profiles: [ "standalone" ]
container_name: gt-goblin-worker
image: ${REGISTRY:-gringotts}/gt-goblin-worker:${TAG:-latest}
build:
context: .
dockerfile: ./worker/Dockerfile
depends_on:
- gt-vault-db
- gt-rabbitmq
environment:
- POSTGRES_HOST=gt-vault-db
- RABBITMQ_HOST=gt-rabbitmq
- OTLP_EXPORTER_URL=host.docker.internal:4317
env_file:
- .env
command: bash -c "
PYTHONPATH=. python ./worker/main.py
"
gt-vault-api:
image: ${REGISTRY:-gringotts}/gt-vault-api:${TAG:-latest}
build:
context: .
dockerfile: ./gringotts/Dockerfile
profiles: ["standalone", "test"]
container_name: gt-vault-api
depends_on:
- gt-vault-db
- gt-rabbitmq
environment:
- POSTGRES_HOST=gt-vault-db
- OTLP_EXPORTER_URL=host.docker.internal:4317
- RABBITMQ_HOST=gt-rabbitmq
env_file:
- .env
command: bash -c "
uvicorn gringotts.main:app
--host 0.0.0.0 --port 8080
--lifespan=on --use-colors --loop uvloop --http httptools
--reload --log-level debug
"
volumes:
- .:/app
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
default:
name: gringotts-network
volumes:
postgres_gt_data:
rabbitmq_gt_data:
rabbitmq_gt_log: