add mastodon
This commit is contained in:
parent
bfbbd7cec2
commit
a64b7b6294
2 changed files with 101 additions and 0 deletions
25
compute-2-mep/mastodon/.env.production
Normal file
25
compute-2-mep/mastodon/.env.production
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
# Generated with mastodon:setup on 2020-02-04 17:37:42 UTC
|
||||||
|
|
||||||
|
LOCAL_DOMAIN=toot.gnous.eu
|
||||||
|
SINGLE_USER_MODE=false
|
||||||
|
|
||||||
|
DB_PORT=5432
|
||||||
|
DB_USER=mastodon
|
||||||
|
DB_NAME=mastodon
|
||||||
|
|
||||||
|
REDIS_HOST=redis
|
||||||
|
REDIS_PORT=6379
|
||||||
|
REDIS_PASSWORD=
|
||||||
|
|
||||||
|
SMTP_PORT=587
|
||||||
|
SMTP_AUTH_METHOD=plain
|
||||||
|
SMTP_OPENSSL_VERIFY_MODE=none
|
||||||
|
SMTP_FROM_ADDRESS=Mastodon <service@gnous.eu>
|
||||||
|
|
||||||
|
S3_ENABLED=true
|
||||||
|
S3_BUCKET=gnoustoot
|
||||||
|
S3_REGION=fr-par
|
||||||
|
S3_HOSTNAME=obiwan.gnous.eu
|
||||||
|
S3_ENDPOINT=https://s3.fr-par.scw.cloud
|
||||||
|
|
||||||
|
ES_ENABLED=false
|
76
compute-2-mep/mastodon/docker-compose.yaml
Normal file
76
compute-2-mep/mastodon/docker-compose.yaml
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
networks:
|
||||||
|
mastodon:
|
||||||
|
external: false
|
||||||
|
enable_ipv6: true
|
||||||
|
|
||||||
|
services:
|
||||||
|
redis:
|
||||||
|
image: redis:7-alpine
|
||||||
|
restart: always
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "redis-cli", "ping"]
|
||||||
|
networks:
|
||||||
|
- mastodon
|
||||||
|
|
||||||
|
web:
|
||||||
|
image: ghcr.io/mastodon/mastodon:v4.3.0
|
||||||
|
restart: always
|
||||||
|
env_file: .env.production
|
||||||
|
command: bundle exec puma -C config/puma.rb
|
||||||
|
healthcheck:
|
||||||
|
# prettier-ignore
|
||||||
|
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:3000/health || exit 1']
|
||||||
|
networks:
|
||||||
|
- mastodon
|
||||||
|
ports:
|
||||||
|
- "4004:3000"
|
||||||
|
depends_on:
|
||||||
|
- redis
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.mastodon-web.entrypoints=websecure"
|
||||||
|
- "traefik.http.routers.mastodon-web.rule=Host(`toot.gnous.eu`)"
|
||||||
|
- "traefik.http.routers.mastodon-web.tls=true"
|
||||||
|
- "traefik.http.routers.mastodon-web.tls.certresolver=defaultacme"
|
||||||
|
- "traefik.http.routers.mastodon-web.middlewares=proxyHeader@file,proxyError@file"
|
||||||
|
# Cron
|
||||||
|
- "ofelia.enabled=true"
|
||||||
|
- "ofelia.job-exec.clean-media.schedule=@daily"
|
||||||
|
- "ofelia.job-exec.clean-media.command=tootctl media remove --days 7"
|
||||||
|
- "ofelia.job-exec.clean-account.schedule=@monthly"
|
||||||
|
- "ofelia.job-exec.clean-account.command=tootctl accounts cull"
|
||||||
|
|
||||||
|
streaming:
|
||||||
|
image: ghcr.io/mastodon/mastodon-streaming:v4.3.0
|
||||||
|
restart: always
|
||||||
|
env_file: .env.production
|
||||||
|
command: node ./streaming/index.js
|
||||||
|
healthcheck:
|
||||||
|
# prettier-ignore
|
||||||
|
test: ['CMD-SHELL', "curl -s --noproxy localhost localhost:4000/api/v1/streaming/health | grep -q 'OK' || exit 1"]
|
||||||
|
ports:
|
||||||
|
- "127.0.0.1:4000:4000"
|
||||||
|
depends_on:
|
||||||
|
- redis
|
||||||
|
networks:
|
||||||
|
- mastodon
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.mastodon-streaming.entrypoints=websecure"
|
||||||
|
- "traefik.http.routers.mastodon-streaming.rule=(Host(`toot.gnous.eu`) && PathPrefix(`/api/v1/streaming`))"
|
||||||
|
- "traefik.http.routers.mastodon-streaming.tls.certresolver=letsencrypt"
|
||||||
|
- "traefik.http.routers.mastodon-streaming.tls=true"
|
||||||
|
- "traefik.http.routers.mastodon-streaming.tls.certresolver=defaultacme"
|
||||||
|
- "traefik.http.routers.mastodon-streaming.middlewares=proxyHeader@file,proxyError@file"
|
||||||
|
|
||||||
|
sidekiq:
|
||||||
|
image: ghcr.io/mastodon/mastodon:v4.3.0
|
||||||
|
restart: always
|
||||||
|
env_file: .env.production
|
||||||
|
command: bundle exec sidekiq
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "ps aux | grep '[s]idekiq\ 6' || false"]
|
||||||
|
networks:
|
||||||
|
- mastodon
|
||||||
|
depends_on:
|
||||||
|
- redis
|
Loading…
Reference in a new issue