Skip to content

Commit 41ba6f0

Browse files
committed
Run multiple replicas of similarity-service
1 parent fa39f47 commit 41ba6f0

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

compose/docker-compose.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,25 @@ services:
5151
similarity-service:
5252
image: quay.io/massbank/massbank3-similarity-service:latest
5353
restart: always
54-
ports:
55-
- "${SIMILARITY_SERVICE_PORT}:8080"
54+
# ports:
55+
# - "${SIMILARITY_SERVICE_PORT}:8080"
5656
environment:
5757
- MSP
5858
- VERBOSE=${SIMILARITY_SERVICE_VERBOSE}
5959
volumes:
6060
- "${MSP_LOCAL_PATH}${MSP}:${MSP}"
61+
deploy:
62+
replicas: 2
63+
64+
nginx:
65+
image: nginx:latest
66+
restart: always
67+
ports:
68+
- "8082:80"
69+
volumes:
70+
- ./nginx.conf:/etc/nginx/nginx.conf:ro
71+
depends_on:
72+
- similarity-service
6173

6274
export-service:
6375
image: quay.io/massbank/massbank3-export-service:latest

compose/nginx.conf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
events {}
2+
3+
http {
4+
upstream similarity_service {
5+
server similarity-service:8080;
6+
}
7+
8+
server {
9+
listen 80;
10+
11+
location / {
12+
proxy_pass http://similarity_service;
13+
}
14+
}
15+
}

0 commit comments

Comments
 (0)