Skip to content

Instantly share code, notes, and snippets.

@shanesoh
Created September 15, 2019 05:43
Show Gist options
  • Save shanesoh/8f15087439eab95c72bf37452186fca3 to your computer and use it in GitHub Desktop.
Save shanesoh/8f15087439eab95c72bf37452186fca3 to your computer and use it in GitHub Desktop.
version: '3'
services:
redis:
image: redis
networks:
- deployml_network
modelserver:
image: shanesoh/modelserver
build: ./modelserver
depends_on:
- redis
networks:
- deployml_network
env_file:
- app.env
environment:
- SERVER_SLEEP=0.25 # Time in ms between each poll by model server against Redis
- BATCH_SIZE=32
deploy:
replicas: 1
restart_policy:
condition: on-failure
placement:
constraints:
- node.role == worker
webserver:
image: shanesoh/webserver
build: ./webserver
ports:
- "80:80"
networks:
- deployml_network
depends_on:
- redis
env_file:
- app.env
environment:
- CLIENT_SLEEP=0.25 # Time in ms between each poll by web server against Redis
- CLIENT_MAX_TRIES=100 # Num tries by web server to retrieve results from Redis before giving up
deploy:
placement:
constraints:
- node.role == manager
networks:
deployml_network:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment