This commit is contained in:
msnie
2024-02-03 11:58:42 +01:00
parent 17ca1c805f
commit 5b0b5f548c
706 changed files with 135245 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
DOMAIN_NAME=knast.cc
DEFAULT_NETWORK=traefik
MYSQL_ROOT_PASSWORD=55pswex5gwg5ZhD97AvzTLNdWMBNbAcvwQqDdVtX
database__connection__password=L5qRYuUY6k5oBDZGXXw27Z4ZjMdPF4nvEU4Yqc2S
MYSQL_PASSWORD=565sCDJPkARAfsvfGvJ6THgG7KtJFMoV3rXeJhb7
LOCAL_DOMAIN=knast.cc
WEB_DOMAIN=mastodon.knast.cc #This is optional and only needed if your instance is hosted on a subdomain, but you want the instance to be known by its domain.
SINGLE_USER_MODE=true #Optional, only needed if you're hosting for just yourself
# Sending mail
# ------------
SMTP_SERVER=<smtp host>
SMTP_PORT=587
SMTP_LOGIN=<username>
SMTP_PASSWORD=<password>
SMTP_FROM_ADDRESS=<address the mastodon instance will email from>
+15
View File
@@ -0,0 +1,15 @@
# PostgreSQL
# There might be some fancy way to de-dupe this, i just sent it.
# ----------
DB_HOST=db
DB_USER=mastodon
DB_NAME=mastodon_production
DB_PASS=FsQH5cTo7DzuaJB6kggksZHWj6DgvySBBmnMrvQP
DB_PORT=5432
# Needed so that the pgsql container creates the expected roles and dbs for you
POSTGRES_DB=mastodon_production
POSTGRES_USER=mastodon
POSTGRES_PASSWORD=FsQH5cTo7DzuaJB6kggksZHWj6DgvySBBmnMrvQP
REDIS_URL=redis://redis:6379
+99
View File
@@ -0,0 +1,99 @@
version: '3'
services:
db:
restart: always
image: postgres:14-alpine
shm_size: 256mb
networks:
- internal_network
volumes:
- /srv/mastodon/postgres14:/var/lib/postgresql/data
# added from the default, otherwise you'll need to manually create a `mastodon` db and user/role
env_file: db.env
environment:
- 'POSTGRES_HOST_AUTH_METHOD=trust'
redis:
restart: always
image: redis:7-alpine
networks:
- internal_network
env_file: db.env
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
volumes:
- /srv/mastodon/redis:/data
web:
image: tootsuite/mastodon:v3.5.3
restart: always
env_file:
- .env
- db.env
command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"
networks:
- traefik
- internal_network
healthcheck:
# prettier-ignore
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:3000/health || exit 1']
depends_on:
- db
- redis
volumes:
- /srv/mastodon/web:/mastodon/public/system
labels:
- traefik.enable=true
- traefik.http.routers.mastodonweb.rule=Host(`mastodon.$DOMAIN_NAME`)
- traefik.http.routers.mastodonweb.entrypoints=websecure
- traefik.http.routers.mastodonweb.tls.certresolver=letsencr
- traefik.http.services.mastodonweb.loadbalancer.server.port=3000
streaming:
image: tootsuite/mastodon:v3.5.3
restart: always
env_file:
- .env
- db.env
command: node ./streaming
networks:
- traefik
- internal_network
healthcheck:
# prettier-ignore
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:4000/api/v1/streaming/health || exit 1']
depends_on:
- db
- redis
labels:
- traefik.enable=true
- traefik.http.routers.mastodonstreaming.rule=(Host(`mastodon.$DOMAIN_NAME`) && PathPrefix(`/api/v1/streaming`))
- traefik.http.routers.mastodonstreaming.entrypoints=websecure
- traefik.http.routers.mastodonstreaming.tls.certresolver=letsencr
- traefik.http.services.mastodonstreaming.loadbalancer.server.port=4000
sidekiq:
image: tootsuite/mastodon:v3.5.3
restart: always
env_file:
- .env
- db.env
command: bundle exec sidekiq
depends_on:
- db
- redis
networks:
- traefik
- internal_network
volumes:
- /srv/mastodon/sidekiq:/mastodon/public/system
healthcheck:
test: ['CMD-SHELL', "ps aux | grep '[s]idekiq\ 6' || false"]
networks:
traefik:
external: true
internal_network:
internal: true