app-store/apps/mastodon/docker-compose.yml
DrMxrcy 34ab4a2a69
Add Mastodon (#538)
* Add Mastodon

* Add Vapid Keys and Fix Internal Network

* Update Sidekiq

* Update Install

* Update Install CMDs

* Trying the LinuxServer Image

* Update port

* Change Path

* Remove Streaming

* traefik updates

* Remove Command

* Update docker-compose.yml

* Update docker-compose.yml

* Change Traefik

* Update

* Update config.json

* Update Configs

* Add Version Warning

* Update Local Domain

* Update Version

* Add ES

* Test ES

* Update Path

* Remove ES, Revert Final Build
2023-05-23 16:07:33 -04:00

96 lines
3.0 KiB
YAML

version: "3"
services:
mastodon:
container_name: mastodon
image: lscr.io/linuxserver/mastodon:4.1.2
ports:
- 8209:80
- ${APP_PORT}:443
volumes:
- ${APP_DATA_DIR}/data/mastodon-config:/config
environment:
- PUID=1000
- PGID=1000
- TZ=${TZ}
- LOCAL_DOMAIN=${MASTODON_LOCAL_DOMAIN}
- WEB_DOMAIN=${APP_DOMAIN}
- VAPID_PUBLIC_KEY=${VAPID_PUBLIC_KEY}
- VAPID_PRIVATE_KEY=${VAPID_PRIVATE_KEY}
- REDIS_HOST=mastodon-redis
- REDIS_PASSWORD=${MASTODON_REDIS_PASSWORD}
- REDIS_PORT=6379
- DB_HOST=mastodon-db
- DB_USER=tipi
- DB_NAME=mastodon
- DB_PASS=${MASTODON_POSTGRES_PASSWORD}
- DB_PORT=5432
- ES_ENABLED=false
#- ES_HOST=mastodon-es
#- ES_PORT=9200
#- ES_USER=elastic
#- ES_PASS=${MASTODON_ELASTIC_PASSWORD}
- SECRET_KEY_BASE=${MASTODON_SECRET_KEY_BASE}
- OTP_SECRET=${MASTODON_OTP_SECRET}
- SMTP_SERVER=${MASTODON_SMTP_SERVER}
- SMTP_PORT=${MASTODON_SMTP_PORT}
- SMTP_LOGIN=${MASTODON_SMTP_LOGIN}
- SMTP_PASSWORD=${MASTODON_SMTP_PASSWORD}
- SMTP_FROM_ADDRESS=${MASTODON_SMTP_FROM_ADDRESS}
- S3_ENABLED=false
#- S3_BUCKET=files.example.com
# - AWS_ACCESS_KEY_ID=
#- AWS_SECRET_ACCESS_KEY=
#- S3_ALIAS_HOST=files.example.com
- SIDEKIQ_ONLY=false
- SIDEKIQ_DEFAULT=false
- SIDEKIQ_THREADS=5
restart: unless-stopped
networks:
- tipi_main_network
labels:
traefik.enable: ${APP_EXPOSED}
traefik.http.routers.mastodon.rule: Host(`${APP_DOMAIN}`)
traefik.http.routers.mastodon.entrypoints: websecure
traefik.http.routers.mastodon.service: mastodon
traefik.http.routers.mastodon.tls.certresolver: myresolver
traefik.http.services.mastodon.loadbalancer.server.port: 443
traefik.http.services.mastodon.loadbalancer.serverstransport: insecuretransport@file
traefik.http.services.mastodon.loadbalancer.server.scheme: https
depends_on:
mastodon-db:
condition: service_healthy
mastodon-redis:
condition: service_healthy
mastodon-db:
restart: always
container_name: mastodon-db
image: postgres:14-alpine
shm_size: 256mb
environment:
POSTGRES_PASSWORD: ${MASTODON_POSTGRES_PASSWORD}
POSTGRES_USER: tipi
POSTGRES_DB: mastodon
PG_DATA: /var/lib/postgresql/data
POSTGRES_HOST_AUTH_METHODL: trust
networks:
- tipi_main_network
healthcheck:
test: ['CMD', 'pg_isready', '-U', 'postgres']
volumes:
- ${APP_DATA_DIR}/data/postgres:/var/lib/postgresql/data
mastodon-redis:
restart: always
image: redis:7-alpine
command: redis-server --appendonly yes --replica-read-only no --requirepass "${MASTODON_REDIS_PASSWORD}"
container_name: mastodon-redis
networks:
- tipi_main_network
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
volumes:
- ${APP_DATA_DIR}/data/redis:/data