102 lines
2.7 KiB
YAML
102 lines
2.7 KiB
YAML
#
|
|
# THIS IS THE FILE THAT WORKS
|
|
#
|
|
|
|
|
|
services:
|
|
db:
|
|
restart: always
|
|
image: postgres:14-alpine
|
|
shm_size: 256mb
|
|
networks:
|
|
- internal_network
|
|
healthcheck:
|
|
test: ['CMD', 'pg_isready', '-U', 'postgres']
|
|
volumes:
|
|
- /srv/mastodon/postgres14:/var/lib/postgresql/data
|
|
environment:
|
|
- 'POSTGRES_HOST_AUTH_METHOD=trust'
|
|
|
|
redis:
|
|
restart: always
|
|
image: redis:7-alpine
|
|
networks:
|
|
- internal_network
|
|
healthcheck:
|
|
test: ['CMD', 'redis-cli', 'ping']
|
|
volumes:
|
|
- /srv/mastodon/redis:/data
|
|
|
|
|
|
web:
|
|
image: ghcr.io/mastodon/mastodon:v4.3.3
|
|
restart: always
|
|
env_file: .env.production
|
|
command: bundle exec puma -C config/puma.rb
|
|
networks:
|
|
- traefik
|
|
- internal_network
|
|
healthcheck:
|
|
# prettier-ignore
|
|
test: ['CMD-SHELL',"curl -s --noproxy localhost localhost:3000/health | grep -q 'OK' || exit 1"]
|
|
# ports:
|
|
# - '127.0.0.1:3000:3000'
|
|
depends_on:
|
|
- db
|
|
- redis
|
|
# - es
|
|
volumes:
|
|
- /srv/mastodon/web:/mastodon/public/system
|
|
labels:
|
|
- traefik.enable=true
|
|
- traefik.http.routers.mastodonweb.rule=Host(`kvist.knast.cc`)
|
|
- traefik.http.routers.mastodonweb.entrypoints=websecure
|
|
- traefik.http.routers.mastodonweb.tls.certresolver=letsencr
|
|
- traefik.http.services.mastodonweb.loadbalancer.server.port=3000
|
|
|
|
streaming:
|
|
image: ghcr.io/mastodon/mastodon-streaming:v4.3.3
|
|
restart: always
|
|
env_file: .env.production
|
|
command: node ./streaming/index.js
|
|
networks:
|
|
- traefik
|
|
- internal_network
|
|
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:
|
|
- db
|
|
- redis
|
|
labels:
|
|
- traefik.enable=true
|
|
- traefik.http.routers.mastodonstreaming.rule=(Host(`kvist.knast.cc`) && 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: ghcr.io/mastodon/mastodon:v4.3.3
|
|
restart: always
|
|
env_file: .env.production
|
|
command: bundle exec sidekiq
|
|
depends_on:
|
|
- db
|
|
- redis
|
|
networks:
|
|
- traefik
|
|
- internal_network
|
|
volumes:
|
|
# - ./public/system:/mastodon/public/system
|
|
- /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
|