145 lines
No EOL
5.1 KiB
YAML
145 lines
No EOL
5.1 KiB
YAML
# since sharkey/misskey lacks documentation, i'll describe how this works here
|
|
#
|
|
# basically: we're splitting up the different things sharkey does into their own seperate services, which makes things more responsive (although heavier) rather than being one giant service doing everything.
|
|
#
|
|
# we keep our default.yml config intact then provide extra *.yml configs for each service respectively
|
|
# - each process will load the values of default.yml first, then load other configs and override default.yml's values
|
|
# - we keep our default.yml to provide character/file size limits, moto of the day, etc. (db/redis/search settings are confined to .env.secrets in our setup but if you don't need/have it you can remove it from here)
|
|
# - our config points each service to their own config, we mount default.yml for each service as well which is read first
|
|
#
|
|
# then caddy (or if you're using this yourself, whatever reverse proxy is preferred) just reverse proxies each endpoint into their respective "service"
|
|
|
|
services:
|
|
# api obviously handles most api endpoints, as well as serving the web frontend
|
|
api:
|
|
image: registry.activitypub.software/transfem-org/sharkey:develop
|
|
restart: always
|
|
ports:
|
|
- "192.168.1.73:60628:3001"
|
|
networks:
|
|
- ip6net
|
|
- db
|
|
- sharkey
|
|
env_file:
|
|
- .env.secrets # secrets contains our db password and stuff like that
|
|
environment:
|
|
- MISSKEY_CONFIG_YML=*.yml
|
|
- MISSKEY_CONFIG_DIR=/sharkey/.config
|
|
- MK_ONLY_SERVER=1
|
|
- MK_DISABLE_CLUSTERING=1
|
|
volumes:
|
|
- ./files:/sharkey/files # unsure which actually needs access to files, so we share with all services just in case
|
|
- ./api:/sharkey/.config
|
|
- ./default.yml:/sharkey/.config/default.yml:ro # default/generic config
|
|
|
|
# queue/process handling. basically the actual backend
|
|
worker:
|
|
image: registry.activitypub.software/transfem-org/sharkey:develop
|
|
restart: always
|
|
networks:
|
|
- db
|
|
- sharkey
|
|
env_file:
|
|
- .env.secrets
|
|
environment:
|
|
- MISSKEY_CONFIG_YML=*.yml
|
|
- MISSKEY_CONFIG_DIR=/sharkey/.config
|
|
- MK_ONLY_QUEUE=1
|
|
volumes:
|
|
- ./files:/sharkey/files
|
|
- ./worker:/sharkey/.config
|
|
- ./default.yml:/sharkey/.config/default.yml:ro
|
|
|
|
# handles federation/activitypub requests
|
|
activity:
|
|
image: registry.activitypub.software/transfem-org/sharkey:develop
|
|
restart: always
|
|
ports:
|
|
- "192.168.1.73:47815:3002"
|
|
networks:
|
|
- ip6net
|
|
- db
|
|
- sharkey
|
|
env_file:
|
|
- .env.secrets
|
|
environment:
|
|
- MISSKEY_CONFIG_YML=*.yml
|
|
- MISSKEY_CONFIG_DIR=/sharkey/.config
|
|
- MK_ONLY_SERVER=1
|
|
- MK_DISABLE_CLUSTERING=1
|
|
- MK_NO_DAEMONS=1
|
|
volumes:
|
|
- ./files:/sharkey/files
|
|
- ./activity:/sharkey/.config
|
|
- ./default.yml:/sharkey/.config/default.yml:ro
|
|
|
|
# handles media/reverse proxy (/files/*)
|
|
media:
|
|
image: registry.activitypub.software/transfem-org/sharkey:develop
|
|
restart: always
|
|
ports:
|
|
- "192.168.1.73:57378:3003"
|
|
networks:
|
|
- ip6net
|
|
- db
|
|
- sharkey
|
|
env_file:
|
|
- .env.secrets
|
|
environment:
|
|
- MISSKEY_CONFIG_YML=*.yml
|
|
- MISSKEY_CONFIG_DIR=/sharkey/.config
|
|
- MK_ONLY_SERVER=1
|
|
- MK_DISABLE_CLUSTERING=1
|
|
- MK_NO_DAEMONS=1
|
|
volumes:
|
|
- ./files:/sharkey/files
|
|
- ./media:/sharkey/.config
|
|
- ./default.yml:/sharkey/.config/default.yml:ro
|
|
|
|
# dragonflydb (redis), as is required by misskey for a good amount of data
|
|
dragonflydb:
|
|
image: docker.dragonflydb.io/dragonflydb/dragonfly
|
|
restart: always
|
|
ulimits:
|
|
memlock: -1
|
|
networks:
|
|
- sharkey
|
|
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 # without this, dfdb would immediately complain loading data
|
|
DFLY_dbfilename: 'dump.rdb' # misskey expects this
|
|
DFLY_df_snapshot_format: false # misskey doesn't know how to handle dfdb's format
|
|
DFLY_dir: '/data' # directory with the snapshot/data
|
|
volumes:
|
|
- ./dfdb:/data
|
|
|
|
# dragonflydb, for caching and required by *key for storing important data
|
|
dfdb:
|
|
image: docker.dragonflydb.io/dragonflydb/dragonfly
|
|
restart: always
|
|
ulimits:
|
|
memlock: -1
|
|
networks:
|
|
- sharkey
|
|
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 # without this, dfdb would immediately complain loading data
|
|
DFLY_dbfilename: 'dump.rdb' # misskey expects this
|
|
DFLY_df_snapshot_format: false # misskey doesn't know how to handle dfdb's format
|
|
DFLY_dir: '/data' # directory with the snapshot/data
|
|
volumes:
|
|
#- ./dragonfly/general:/data
|
|
- ./dfdb:/data
|
|
|
|
networks:
|
|
db:
|
|
name: postgres_db
|
|
external: true
|
|
ip6net:
|
|
name: ip6net
|
|
external: true
|
|
sharkey: |