synth.download/phosphorus/srv/docker/mastodon/compose.yaml

181 lines
No EOL
4.4 KiB
YAML

services:
web:
# we use our own synth-soc fork
image: ghcr.io/melontini/mastodon:nightly
restart: always
env_file:
- .env.secrets
- .env
command: bundle exec puma -C config/puma.rb
networks:
- masto
- ip6net
- db
healthcheck:
test: ['CMD-SHELL',"curl -s --noproxy localhost localhost:3000/health | grep -q 'OK' || exit 1"]
ports:
- "192.168.1.73:46098:3000"
depends_on:
dragonfly:
condition: service_healthy
volumes:
- ./public/system:/mastodon/public/system
- ./shared:/shared # this is just to allow seeing/copying emoji exports
streaming:
image: ghcr.io/melontini/mastodon-streaming:nightly
restart: always
env_file:
- .env.secrets
- .env
command: node ./streaming/index.js
networks:
- masto
- ip6net
- db
healthcheck:
test: ['CMD-SHELL', "curl -s --noproxy localhost localhost:4000/api/v1/streaming/health | grep -q 'OK' || exit 1"]
ports:
- "192.168.1.73:58834:4000"
depends_on:
dragonfly:
condition: service_healthy
ingress:
image: ghcr.io/melontini/mastodon-ingress:nightly
restart: always
env_file:
- .env.secrets
- .env
networks:
- masto
- db
depends_on:
dragonfly:
condition: service_healthy
sidekiq:
image: ghcr.io/melontini/mastodon:nightly
restart: always
env_file:
- .env.secrets
- .env
command: bundle exec sidekiq
depends_on:
dragonfly:
condition: service_healthy
networks:
- masto
- ip6net
- db
volumes:
- ./public/system:/mastodon/public/system
healthcheck:
test: ['CMD-SHELL', "ps aux | grep '[s]idekiq\ 7' || false"]
# generic dragonfly instance
dragonfly:
image: docker.dragonflydb.io/dragonflydb/dragonfly
restart: always
ulimits:
memlock: -1
networks:
- masto
environment:
# these envvars are important in order for dragonflydb/misskey to interact with each other properly, and to load and save all data properly
DFLY_snapshot_cron: '* * * * *'
DFLY_version_check: false
DFLY_default_lua_flags: allow-undeclared-keys
DFLY_dbfilename: 'dump.rdb'
DFLY_df_snapshot_format: false
DFLY_dir: '/data'
volumes:
- ./dragonfly/generic:/data
healthcheck:
test: "redis-cli ping"
interval: 5s
retries: 20
# cache dragonfly instance
dragonfly-cache:
image: docker.dragonflydb.io/dragonflydb/dragonfly
restart: always
ulimits:
memlock: -1
networks:
- masto
environment:
DFLY_port: 6380
DFLY_snapshot_cron: '* * * * *'
DFLY_version_check: false
DFLY_default_lua_flags: allow-undeclared-keys
DFLY_dbfilename: 'dump.rdb'
DFLY_df_snapshot_format: false
DFLY_dir: '/data'
volumes:
- ./dragonfly/cache:/data
healthcheck:
test: "redis-cli ping"
interval: 5s
retries: 20
# sidekiq dragonfly instance
dragonfly-sidekiq:
image: docker.dragonflydb.io/dragonflydb/dragonfly
restart: always
ulimits:
memlock: -1
networks:
- masto
environment:
DFLY_port: 6381
DFLY_snapshot_cron: '* * * * *'
DFLY_version_check: false
DFLY_default_lua_flags: allow-undeclared-keys
DFLY_dbfilename: 'dump.rdb'
DFLY_df_snapshot_format: false
DFLY_dir: '/data'
volumes:
- ./dragonfly/sidekiq:/data
healthcheck:
test: "redis-cli ping"
interval: 5s
retries: 20
# used to passthrough web files via local network
darkhttpd:
image: p3terx/darkhttpd
restart: unless-stopped
ports:
- "192.168.1.73:42261:80"
volumes:
- ./public/system:/mastodon/public/system
command:
- "/mastodon/public/system"
# tor is a wip - consider setting up later
## Uncomment to enable federation with tor instances along with adding the following ENV variables
## http_hidden_proxy=http://privoxy:8118
## ALLOW_ACCESS_TO_HIDDEN_SERVICE=true
# tor:
# image: sirboops/tor
# networks:
# - external_network
# - internal_network
#
# privoxy:
# image: sirboops/privoxy
# volumes:
# - ./priv-config:/opt/config
# networks:
# - external_network
# - internal_network
networks:
db:
name: postgres_db
external: true
ip6net:
name: ip6net
external: true
masto: