-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
185 lines (181 loc) · 6.66 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
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
services:
serval-api:
hostname: serval-api
container_name: serval_cntr
build:
context: .
dockerfile: dockerfile.development
environment:
- ASPNETCORE_ENVIRONMENT=Staging
- ASPNETCORE_DeploymentVersion=docker-compose
- Auth__Domain=sil-appbuilder.auth0.com
- Auth__Audience=https://serval-api.org/
- ASPNETCORE_Kestrel__Endpoints__Http__Url=http://*:80
- ASPNETCORE_Kestrel__Endpoints__Http2__Url=http://*:81
- ASPNETCORE_Kestrel__Endpoints__Http2__Protocols=Http2
- ASPNETCORE_ConnectionStrings__Hangfire=mongodb://mongo:27017/serval_jobs?replicaSet=myRS
- ASPNETCORE_ConnectionStrings__Mongo=mongodb://mongo:27017/serval?replicaSet=myRS
- ASPNETCORE_Translation__Engines__0__Type=Echo
- ASPNETCORE_Translation__Engines__0__Address=http://echo
- ASPNETCORE_Translation__Engines__1__Type=SmtTransfer
- ASPNETCORE_Translation__Engines__1__Address=http://machine-engine
- ASPNETCORE_Translation__Engines__2__Type=Nmt
- ASPNETCORE_Translation__Engines__2__Address=http://machine-engine
- "Bugsnag__ApiKey=${Bugsnag__ApiKey}"
expose:
- 80
- 81
ports:
- 80:80
depends_on:
- mongo
volumes:
- .:/app:ro
- ~/.nuget/packages:/root/.nuget/packages:ro
- /var/lib/serval:/var/lib/serval
working_dir: '/app/src/Serval/src/Serval.ApiServer'
entrypoint:
- dotnet
- run
- --no-build
- --no-launch-profile
- --additionalProbingPath
- /root/.nuget/packages
echo:
hostname: echo
container_name: echo_cntr
build:
context: .
dockerfile: dockerfile.development
environment:
- ASPNETCORE_ENVIRONMENT=Staging
- ASPNETCORE_Kestrel__Endpoints__Http__Url=http://*:80
- ASPNETCORE_Kestrel__EndpointDefaults__Protocols=Http2
- ASPNETCORE_ConnectionStrings__TranslationPlatformApi=http://serval-api:81
- "Bugsnag__ApiKey=${Bugsnag__ApiKey}"
expose:
- 80
ports:
- 81:80
depends_on:
- serval-api
volumes:
- .:/app:ro
- ~/.nuget/packages:/root/.nuget/packages:ro
- /var/lib/serval:/var/lib/serval
working_dir: '/app/src/Echo/src/EchoTranslationEngine'
entrypoint:
- dotnet
- run
- --no-build
- --no-launch-profile
- --additionalProbingPath
- /root/.nuget/packages
machine-engine:
hostname: machine-engine
container_name: machine-engine-cntr
build:
context: .
dockerfile: dockerfile.development
environment:
- ASPNETCORE_ENVIRONMENT=Staging
- ASPNETCORE_Kestrel__Endpoints__Https__Url=http://*:80
- ASPNETCORE_Kestrel__EndpointDefaults__Protocols=Http2
- ASPNETCORE_ConnectionStrings__Hangfire=mongodb://mongo:27017/machine_jobs?replicaSet=myRS
- ASPNETCORE_ConnectionStrings__Mongo=mongodb://mongo:27017/machine?replicaSet=myRS
- ASPNETCORE_ConnectionStrings__Serval=http://serval-api:81
- ClearML__ApiServer=https://api.sil.hosted.allegro.ai
- ClearML__Project=docker-compose
- "ClearML__AccessKey=${ClearML_AccessKey:?access key needed}"
- "ClearML__SecretKey=${ClearML_SecretKey:?secret key needed}"
- BuildJob__ClearML__0__Queue=lambert_24gb
- BuildJob__ClearML__0__DockerImage=${MACHINE_PY_IMAGE:-ghcr.io/sillsdev/machine.py:latest}
- BuildJob__ClearML__1__Queue=lambert_24gb.cpu_only
- BuildJob__ClearML__1__DockerImage=${MACHINE_PY_CPU_IMAGE:-ghcr.io/sillsdev/machine.py:latest.cpu_only}
- SharedFile__Uri=s3://silnlp/docker-compose/
- "SharedFile__S3AccessKeyId=${AWS_ACCESS_KEY_ID:?access key needed}"
- "SharedFile__S3SecretAccessKey=${AWS_SECRET_ACCESS_KEY:?secret key needed}"
- "Bugsnag__ApiKey=${Bugsnag__ApiKey}"
expose:
- 80
ports:
- 82:80
depends_on:
- mongo
- serval-api
volumes:
- .:/app:ro
- ~/.nuget/packages:/root/.nuget/packages:ro
- /var/lib/machine:/var/lib/machine
- /var/lib/serval:/var/lib/serval
working_dir: '/app/src/Machine/src/Serval.Machine.EngineServer'
entrypoint:
- dotnet
- run
- --no-build
- --no-launch-profile
- --additionalProbingPath
- /root/.nuget/packages
machine-job-server:
hostname: machine-job-server
container_name: machine-job-cntr
build:
context: .
dockerfile: dockerfile.development
environment:
- ASPNETCORE_ENVIRONMENT=Staging
- ASPNETCORE_ConnectionStrings__Hangfire=mongodb://mongo:27017/machine_jobs?replicaSet=myRS
- ASPNETCORE_ConnectionStrings__Mongo=mongodb://mongo:27017/machine?replicaSet=myRS
- ASPNETCORE_ConnectionStrings__Serval=http://serval-api:81
- ASPNETCORE_Kestrel__Endpoints__Http__Url=http://*:80
- ASPNETCORE_Kestrel__EndpointDefaults__Protocols=Http2
- ClearML__ApiServer=https://api.sil.hosted.allegro.ai
- ClearML__Project=docker-compose
- "ClearML__AccessKey=${ClearML_AccessKey:?access key needed}"
- "ClearML__SecretKey=${ClearML_SecretKey:?secret key needed}"
- BuildJob__ClearML__0__Queue=lambert_24gb
- BuildJob__ClearML__0__DockerImage=${MACHINE_PY_IMAGE:-ghcr.io/sillsdev/machine.py:latest}
- BuildJob__ClearML__1__Queue=lambert_24gb.cpu_only
- BuildJob__ClearML__1__DockerImage=${MACHINE_PY_CPU_IMAGE:-ghcr.io/sillsdev/machine.py:latest.cpu_only}
- SharedFile__Uri=s3://silnlp/docker-compose/
- "SharedFile__S3AccessKeyId=${AWS_ACCESS_KEY_ID:?access key needed}"
- "SharedFile__S3SecretAccessKey=${AWS_SECRET_ACCESS_KEY:?secret key needed}"
- "Bugsnag__ApiKey=${Bugsnag__ApiKey}"
expose:
- 80
ports:
- 83:80
depends_on:
- mongo
- machine-engine
- serval-api
volumes:
- .:/app:ro
- ~/.nuget/packages:/root/.nuget/packages:ro
- /var/lib/machine:/var/lib/machine
- /var/lib/serval:/var/lib/serval
working_dir: '/app/src/Machine/src/Serval.Machine.JobServer'
entrypoint:
- dotnet
- run
- --no-build
- --no-launch-profile
- --additionalProbingPath
- /root/.nuget/packages
mongo:
hostname: mongo
image: mongo:6.0
expose:
- 27017
ports:
- 27017:27017
restart: always
# Run Mongo (with output to normal shell)
# then configure the locally running mongo to be a standalone replica set
# then hang forever so the container does not exit
command:
[
'/bin/sh',
'-c',
'mongod --quiet --replSet myRS --bind_ip 0.0.0.0 & sleep 2s; mongosh --host localhost:27017 --eval '' config = { "_id" : "myRS", "members" : [{"_id" : 0,"host" : "mongo:27017"}] }; rs.initiate(config, { force: true }); '' ; sleep infinity'
]