forked from digirati-co-uk/madoc-config
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
executable file
·164 lines (149 loc) · 4.57 KB
/
docker-compose.yaml
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
version: "3.9"
services:
## API Gateway
gateway:
container_name: standalone-gateway
image: ghcr.io/digirati-co-uk/madoc-nginx:${MADOC_VERSION:-main}
ports:
- "8878:8080"
links:
- tasks-api
- model-api
- madoc-ts
- config-service
- storage-api
- okra
- search
gateway-redis:
image: redis:5-alpine
shared-postgres:
image: ghcr.io/digirati-co-uk/madoc-postgres:${MADOC_VERSION:-main}
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres_password
- POSTGRES_MADOC_TS_USER=madoc_ts
- POSTGRES_MADOC_TS_SCHEMA=madoc_ts
- POSTGRES_MADOC_TS_PASSWORD=madoc_ts_password
- POSTGRES_TASKS_API_USER=tasks_api
- POSTGRES_TASKS_API_SCHEMA=tasks_api
- POSTGRES_TASKS_API_PASSWORD=tasks_api_password
- POSTGRES_MODELS_API_USER=models_api
- POSTGRES_MODELS_API_SCHEMA=models_api
- POSTGRES_MODELS_API_PASSWORD=models_api_password
- POSTGRES_CONFIG_SERVICE_USER=config_service
- POSTGRES_CONFIG_SERVICE_SCHEMA=config_service
- POSTGRES_CONFIG_SERVICE_PASSWORD=config_service_password
- POSTGRES_SEARCH_API_USER=search_api
- POSTGRES_SEARCH_API_SCHEMA=search_api
- POSTGRES_SEARCH_API_PASSWORD=search_api_password
volumes:
- shared_postgres_data:/var/lib/postgresql/data:Z
## Services.
madoc-ts:
image: ghcr.io/digirati-co-uk/madoc-api:${MADOC_VERSION-main}
restart: on-failure
volumes:
- jwt:/home/node/app/service-jwt-responses:Z
- files:/home/node/app/files:Z
- ./translations/pt:/home/node/app/translations/pt:Z
environment:
- DATABASE_HOST=shared-postgres
- DATABASE_NAME=postgres
- DATABASE_PORT=5432
- DATABASE_USER=madoc_ts
- DATABASE_SCHEMA=madoc_ts
- DATABASE_PASSWORD=madoc_ts_password
- REDIS_HOST=gateway-redis
- STORAGE_FILE_DIRECTORY=/home/node/app/files
- NODE_ENV=production
- MIGRATE=true
- MADOC_INSTALLATION_CODE=${MADOC_INSTALLATION_CODE:-$2b$14$Ox8ZXjeGBR7s23VB0wqZuuYwBo13vK3oGfczzj/gQXqYM1/BUXXS6}
- API_GATEWAY=http://gateway:8080
- GATEWAY_HOST=http://localhost:8878
links:
- shared-postgres
tasks-api:
image: ghcr.io/digirati-co-uk/tasks-api:latest
restart: on-failure
environment:
- SERVER_PORT=3000
- DATABASE_HOST=shared-postgres
- DATABASE_NAME=postgres
- DATABASE_PORT=5432
- DATABASE_USER=tasks_api
- DATABASE_SCHEMA=tasks_api
- DATABASE_PASSWORD=tasks_api_password
- QUEUE_LIST=tasks-api,madoc-ts
- REDIS_HOST=gateway-redis
links:
- shared-postgres
- gateway-redis
storage-api:
image: ghcr.io/digirati-co-uk/storage-api:latest
environment:
- GATEWAY_HOST=http://localhost:8878
volumes:
- storage-api:/home/node/app/files:Z
## Docker hub services
model-api:
image: digirati/capture-models:latest
restart: on-failure
environment:
- SERVER_PORT=3000
- DATABASE_HOST=shared-postgres
- DATABASE_NAME=postgres
- DATABASE_PORT=5432
- DATABASE_USER=models_api
- DATABASE_SCHEMA=models_api
- DATABASE_PASSWORD=models_api_password
links:
- shared-postgres
config-service:
image: digirati/madoc_config_service_django:175410fc5b7dbef4cc259686564fbedeb60c8789
environment:
- USE_DOCKER=yes
- IPYTHONDIR=/app/.ipython
- MIGRATE=True
- LOAD=False
- DJANGO_DEBUG=False
- WAITRESS=False
- POSTGRES_HOST=shared-postgres
- POSTGRES_PORT=5432
- POSTGRES_USER=config_service
- POSTGRES_SCHEMA=config_service
- POSTGRES_PASSWORD=config_service_password
- POSTGRES_DB=postgres
- DATABASE_URL=postgres://postgres:postgres_password@shared-postgres:5432/postgres
links:
- shared-postgres
search:
image: digirati/madoc-search:latest
environment:
- BROWSABLE=False
- USE_DOCKER=yes
- IPYTHONDIR=/app/.ipython
- MIGRATE=True
- LOAD=False
- DJANGO_DEBUG=False
- DEBUG=False
- WAITRESS=False
- POSTGRES_HOST=shared-postgres
- POSTGRES_PORT=5432
- POSTGRES_USER=search_api
- POSTGRES_SCHEMA=search_api
- POSTGRES_PASSWORD=search_api_password
- POSTGRES_DB=postgres
- DATABASE_URL=postgres://postgres:postgres_password@shared-postgres:5432/postgres
links:
- shared-postgres
okra:
image: digirati/okra:latest
volumes:
# Shared resources
jwt: {}
# Databases
shared_postgres_data: {}
# Files
files: {}
storage-api: {}