This repository has been archived by the owner on Aug 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-swarm.yml
45 lines (45 loc) · 1.7 KB
/
docker-compose-swarm.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
# https://docs.docker.com/compose/compose-file/compose-versioning/
version: '3'
services:
datastore:
image: cardiacmodelling/ap-nimbus-datastore:0.0.5
ports:
- 8118:8118
environment:
MONGO_INITDB_ROOT_USERNAME: example
MONGO_INITDB_ROOT_PASSWORD: example
PORT: 8118
# Docker networks "swarm_database" traffic to the "database" service.
WAIT_HOSTS: swarm_database:27017
database:
image: mongo:4.0
environment:
MONGO_INITDB_ROOT_USERNAME: example
MONGO_INITDB_ROOT_PASSWORD: example
MONGO_INITDB_DATABASE: api
MONGO_DATA_DIR: /data/db
MONGO_TEST_DATA_DIR: /data/test_db
MONGO_LOG_FILE: /var/log/mongodb/mongodb.log
command: "mongod --smallfiles --logpath=/var/log/mongodb/mongodb.log"
appmanager:
image: cardiacmodelling/ap-nimbus-app-manager:0.0.10
deploy:
mode: replicated
# Bump this number up to try starting more than one app-manager.
replicas: 1
ports:
- "8080:8080"
environment:
# Docker networks "swarm_datastore" traffic to the "datastore" service.
REST_API_URL_DATA: http://swarm_datastore:8118/
clientdirect:
image: cardiacmodelling/ap-nimbus-client-direct:0.0.6
environment:
# Can't use the docker DNS as calls originate from browser (not within docker network).
# For me docker0 in ifconfig is 172.17.0.1.
# Alternatives (e.g. assigning IPv4 addresses) for calls to containers from host, e.g
# https://stackoverflow.com/questions/37242217/access-docker-container-from-host-using-containers-name
REST_API_URL_APPMGR: http://172.17.0.1:8080/
REST_API_URL_DATA: http://172.17.0.1:8118/api/collection/
ports:
- "4200:4200"