Skip to content

Commit

Permalink
Add resources limits
Browse files Browse the repository at this point in the history
  • Loading branch information
orlea committed Jan 4, 2020
1 parent 0c08a89 commit bbb00af
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions mastodon/mstdn-asterism-xyz.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit bbb00af

Please sign in to comment.