-
-
Save mohemohe/fecb36591fb1737ccce96fb977514565 to your computer and use it in GitHub Desktop.
mstdn.plusminus.io docker swarm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.7" | |
services: | |
nginx: | |
image: nginx | |
networks: | |
- default | |
- cloudflared | |
ports: | |
- 2100:80 | |
volumes: | |
- /data/mastodon_prd/nginx:/etc/nginx/conf.d | |
deploy: | |
mode: replicated | |
replicas: 2 | |
placement: | |
constraints: [node.role == worker] | |
restart_policy: | |
condition: on-failure | |
logging: | |
driver: awslogs | |
options: | |
awslogs-region: ap-northeast-1 | |
awslogs-group: "/home/swarm/mastodon_prd/nginx" | |
awslogs-create-group: "true" | |
mastoguard: | |
image: mohemohe/mastoguard | |
networks: | |
- default | |
extra_hosts: | |
- "host.docker.internal:host-gateway" | |
environment: | |
TZ: "Asia/Tokyo" | |
env_file: | |
- mastoguard.env | |
deploy: | |
mode: replicated | |
replicas: 2 | |
placement: | |
constraints: [node.role == worker] | |
restart_policy: | |
condition: on-failure | |
logging: | |
driver: awslogs | |
options: | |
awslogs-region: ap-northeast-1 | |
awslogs-group: "/home/swarm/mastodon_prd/mastoguard" | |
awslogs-create-group: "true" | |
web: | |
image: plusminusio/mastodon:beta | |
networks: | |
- default | |
extra_hosts: | |
- "host.docker.internal:host-gateway" | |
environment: | |
TZ: "Asia/Tokyo" | |
env_file: | |
- mastodon.env | |
command: bundle exec rails s -p 3001 -b '0.0.0.0' | |
deploy: | |
mode: replicated | |
replicas: 2 | |
placement: | |
constraints: [node.role == worker] | |
restart_policy: | |
condition: on-failure | |
logging: | |
driver: awslogs | |
options: | |
awslogs-region: ap-northeast-1 | |
awslogs-group: "/home/swarm/mastodon_prd/web" | |
awslogs-create-group: "true" | |
sidekiq: | |
image: plusminusio/mastodon:beta | |
networks: | |
- default | |
extra_hosts: | |
- "host.docker.internal:host-gateway" | |
environment: | |
TZ: "Asia/Tokyo" | |
env_file: | |
- mastodon.env | |
command: bundle exec sidekiq -c 25 -q default -q mailers -q push -q pull -q scheduler -q ingress | |
deploy: | |
mode: replicated | |
replicas: 2 | |
placement: | |
constraints: [node.role == worker] | |
restart_policy: | |
condition: on-failure | |
logging: | |
driver: awslogs | |
options: | |
awslogs-region: ap-northeast-1 | |
awslogs-group: "/home/swarm/mastodon_prd/sidekiq" | |
awslogs-create-group: "true" | |
streaming: | |
image: plusminusio/mastodon:beta | |
networks: | |
- default | |
extra_hosts: | |
- "host.docker.internal:host-gateway" | |
environment: | |
TZ: "Asia/Tokyo" | |
env_file: | |
- mastodon.env | |
command: yarn start | |
deploy: | |
mode: replicated | |
replicas: 1 | |
placement: | |
constraints: [node.role == worker] | |
restart_policy: | |
condition: on-failure | |
logging: | |
driver: awslogs | |
options: | |
awslogs-region: ap-northeast-1 | |
awslogs-group: "/home/swarm/mastodon_prd/streaming" | |
awslogs-create-group: "true" | |
networks: | |
default: | |
cloudflared: | |
external: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment