Skip to content
Permalink
Browse files

Add resources limits

  • Loading branch information
orlea committed Jan 4, 2020
1 parent 0c08a89 commit bbb00af5a942c5bd55968d62517edfff8e951e31
Showing with 16 additions and 10 deletions.
  1. +16 −10 mastodon/mstdn-asterism-xyz.yml
@@ -1,35 +1,41 @@
version: '3'
services:
web:
image: tootsuite/mastodon:latest
image: tootsuite/mastodon:v3.0.1
deploy:
replicas: 1
replicas: 2
placement:
constraints:
- node.role == worker
resources:
limits:
memory: 512M
env_file: .env.production
command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"
healthcheck:
test: ["CMD-SHELL", "wget -q --spider --header 'x-forwarded-proto: https' --proxy=off localhost:3000/api/v1/instance || exit 1"]
test: ["CMD-SHELL", "wget -q --spider --proxy=off localhost:3000/health || exit 1"]
ports:
- "3000:3000"
- "127.0.0.1:3000:3000"
streaming:
image: tootsuite/mastodon:latest
image: tootsuite/mastodon:v3.0.1
deploy:
replicas: 1
replicas: 2
placement:
constraints:
- node.role == worker
resources:
limits:
memory: 64M
env_file: .env.production
command: node ./streaming
healthcheck:
test: ["CMD-SHELL", "wget -q --spider --header 'x-forwarded-proto: https' --proxy=off localhost:4000/api/v1/streaming/health || exit 1"]
test: ["CMD-SHELL", "wget -q --spider --proxy=off localhost:4000/api/v1/streaming/health || exit 1"]
ports:
- "4000:4000"
- "127.0.0.1:4000:4000"
sidekiq:
image: tootsuite/mastodon:latest
image: tootsuite/mastodon:v3.0.1
deploy:
replicas: 1
replicas: 2
placement:
constraints:
- node.role == worker

0 comments on commit bbb00af

Please sign in to comment.
You can’t perform that action at this time.