version: "3.9"
services:
mastodon-redis:
image: redis
container_name: Mastodon-REDIS
hostname: mastodon-redis
security_opt:
- no-new-privileges:true
healthcheck:
test: ["CMD-SHELL", "redis-cli ping || exit 1"]
user: 1026:100
environment:
- TZ=Europe/Bucharest
volumes:
- /volume1/docker/mastodon/redis:/data
restart: always
mastodon-db:
image: postgres
container_name: Mastodon-DB
hostname: mastodon-db
security_opt:
- no-new-privileges:true
healthcheck:
test: ["CMD", "pg_isready", "-q", "-d", "mastodon", "-U", "mastodonuser"]
timeout: 45s
interval: 10s
retries: 10
user: 1026:100
volumes:
- /volume1/docker/mastodon/db:/var/lib/postgresql/data
environment:
POSTGRES_DB: mastodon
POSTGRES_USER: mastodonuser
POSTGRES_PASSWORD: mastodonpw
restart: always
mastodon:
image: lscr.io/linuxserver/mastodon:latest
container_name: Mastodon
hostname: mastodon
security_opt:
- no-new-privileges:true
environment:
- PUID=1026
- PGID=100
- TZ=Europe/Bucharest
- DEFAULT_LOCALE=en
- LOCAL_DOMAIN=mastodon.yourname.synology.me
- WEB_DOMAIN=mastodon.yourname.synology.me
- REDIS_HOST=mastodon-redis
- REDIS_PORT=6379
- DB_HOST=mastodon-db
- DB_USER=mastodonuser
- DB_NAME=mastodon
- DB_PASS=mastodonpw
- DB_PORT=5432
- ES_ENABLED=false
- ES_HOST=es
- ES_PORT=9200
- ES_USER=elastic
- ES_PASS=elastic
- SECRET_KEY_BASE=2e80b1b7d3a70f6358ab08a1cebdffc2424d8800c8ff764ff238f892abd539ff70000f31310d21ac7391d281795479b6d97263edd5d88c05070b6b8acbadf2ab
- OTP_SECRET=eca299ae599a9b4eda009b2abfc1ee5b01e0ca30eea060f2a47c6ca3075c4d3616df992ae7e437fcd061aeb6dc9f9cc3d38e79ab090324092777984478996c06
- S3_ENABLED=false
volumes:
- /volume1/docker/mastodon/config:/config
ports:
- 8562:443
restart: always
depends_on:
mastodon-redis:
condition: service_healthy
mastodon-db:
condition: service_started