2025-08-14 01:43:53 -05:00
# 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"
2025-07-19 23:52:19 -05:00
services :
2025-08-14 01:43:53 -05:00
# api obviously handles most api endpoints, as well as serving the web frontend
api :
2025-09-20 15:58:32 -05:00
image : registry.activitypub.software/transfem-org/sharkey:develop
2025-07-19 23:52:19 -05:00
restart : always
ports :
2025-09-20 15:58:32 -05:00
- "192.168.1.73:60628:3001"
2025-07-19 23:52:19 -05:00
networks :
- ip6net
- db
2025-08-14 01:43:53 -05:00
- 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 :
2025-09-20 15:58:32 -05:00
image : registry.activitypub.software/transfem-org/sharkey:develop
2025-08-14 01:43:53 -05:00
restart : always
networks :
- db
- sharkey
env_file :
- .env.secrets
2025-07-19 23:52:19 -05:00
environment :
2025-08-14 01:43:53 -05:00
- MISSKEY_CONFIG_YML=*.yml
- MISSKEY_CONFIG_DIR=/sharkey/.config
- MK_ONLY_QUEUE=1
2025-07-19 23:52:19 -05:00
volumes :
- ./files:/sharkey/files
2025-08-14 01:43:53 -05:00
- ./worker:/sharkey/.config
- ./default.yml:/sharkey/.config/default.yml:ro
2025-07-19 23:52:19 -05:00
2025-08-14 01:43:53 -05:00
# handles federation/activitypub requests
activity :
2025-09-20 15:58:32 -05:00
image : registry.activitypub.software/transfem-org/sharkey:develop
2025-08-14 01:43:53 -05:00
restart : always
ports :
2025-09-20 15:58:32 -05:00
- "192.168.1.73:47815:3002"
2025-08-14 01:43:53 -05:00
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 :
2025-09-20 15:58:32 -05:00
image : registry.activitypub.software/transfem-org/sharkey:develop
2025-08-14 01:43:53 -05:00
restart : always
ports :
2025-09-20 15:58:32 -05:00
- "192.168.1.73:57378:3003"
2025-08-14 01:43:53 -05:00
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
2025-10-08 23:33:45 -05:00
# dragonflydb (redis), as is required by misskey for a good amount of data
dragonflydb :
2025-08-14 21:30:01 -05:00
image : docker.dragonflydb.io/dragonflydb/dragonfly
2025-07-19 23:52:19 -05:00
restart : always
2025-08-14 21:30:01 -05:00
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
2025-07-19 23:52:19 -05:00
volumes :
2025-10-08 23:33:45 -05:00
- ./dfdb:/data
2025-09-20 15:58:32 -05:00
2025-10-08 23:33:45 -05:00
# dragonflydb, for caching and required by *key for storing important data
dfdb :
2025-08-14 21:30:01 -05:00
image : docker.dragonflydb.io/dragonflydb/dragonfly
restart : always
ulimits :
memlock : -1
2025-08-14 01:43:53 -05:00
networks :
- sharkey
2025-08-14 21:30:01 -05:00
environment :
2025-10-08 23:33:45 -05:00
# these envvars are important in order for dragonflydb/misskey to interact with each other properly, and to load and save all data properly
2025-08-14 21:30:01 -05:00
DFLY_snapshot_cron : '* * * * *'
DFLY_version_check : false
2025-10-08 23:33:45 -05:00
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
2025-08-14 21:30:01 -05:00
volumes :
2025-10-08 23:33:45 -05:00
#- ./dragonfly/general:/data
- ./dfdb:/data
2025-07-19 23:52:19 -05:00
networks :
db :
name : postgres_db
external : true
ip6net :
name : ip6net
external : true
2025-08-14 01:43:53 -05:00
sharkey :