forked from imagineapi/imagineapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
105 lines (97 loc) · 2.32 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
101
102
103
104
105
version: "3"
services:
database:
image: imagineapi/imagineapi-postgres:latest
restart: always
env_file:
- ./.shared.env
environment:
POSTGRES_USER: postgres
POSTGRES_DB: imagineapi
#ports:
#- 5432:5432 # uncomment to connect to db from host
volumes:
- database:/var/lib/postgresql/data
networks:
- imagineapi_net
api:
image: imagineapi/imagineapi-api:latest
ports:
- 8055:8055
environment:
DB_CLIENT: postgres
DB_HOST: database
DB_PORT: 5432
DB_DATABASE: imagineapi
DB_USER: postgres
STANDARD_ROLE_ID: 09c04dcf-5a1b-4583-b900-b259fa32dffa
CONSUMER_ROLE_ID: 28cd8ba9-5485-4f52-80e6-04c91c827b09
RABBITMQ_HOST: rabbitmq
RABBITMQ_PORT: 5672
EXTENSIONS_PATH: /directus/custom-extensions
env_file:
- ./.shared.env
volumes:
- api:/directus/uploads
depends_on:
rabbitmq:
condition: service_healthy
database:
condition: service_started
networks:
- imagineapi_net
rabbitmq:
image: rabbitmq:3.8.0-management
environment:
RABBITMQ_DEFAULT_VHOST: '/'
RABBITMQ_NODENAME: rabbit@localhost
env_file:
- ./.shared.env
volumes:
- rabbitmq:/var/lib/rabbitmq/mnesia
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "status"]
interval: 5s
timeout: 10s
retries: 5
ports:
- 15672:15672
networks:
- imagineapi_net
bot:
image: imagineapi/imagineapi-bot:latest
environment:
SERVICE_NAME: consumer
API_URL: http://api:8055
RABBITMQ_HOST: rabbitmq
RABBITMQ_PORT: 5672
env_file:
- ./.shared.env
volumes:
- ./bot/logs:/usr/src/app/logs
- proc_info:/usr/src/app/proc
depends_on:
rabbitmq:
condition: service_healthy
api:
condition: service_started
restart: unless-stopped
networks:
- imagineapi_net
# auto-heal ensures that containers are restarted if they fail health checks (added for bot)
autoheal:
image: willfarrell/autoheal
restart: always
networks:
- imagineapi_net
environment:
- AUTOHEAL_CONTAINER_LABEL=all
volumes:
- /var/run/docker.sock:/var/run/docker.sock
volumes:
proc_info:
api:
rabbitmq:
database:
networks:
imagineapi_net: