131 lines
No EOL
3.9 KiB
YAML
131 lines
No EOL
3.9 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:latest
|
|
restart: always
|
|
depends_on:
|
|
redis:
|
|
condition: service_healthy
|
|
ports:
|
|
- "127.0.0.1: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:latest
|
|
restart: always
|
|
depends_on:
|
|
redis:
|
|
condition: service_healthy
|
|
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:latest
|
|
restart: always
|
|
depends_on:
|
|
redis:
|
|
condition: service_healthy
|
|
ports:
|
|
- "127.0.0.1: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:latest
|
|
restart: always
|
|
depends_on:
|
|
redis:
|
|
condition: service_healthy
|
|
ports:
|
|
- "127.0.0.1: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
|
|
|
|
# redis is used for caching
|
|
redis:
|
|
restart: always
|
|
image: redis:alpine
|
|
volumes:
|
|
- ./redis:/data
|
|
networks:
|
|
- sharkey
|
|
healthcheck:
|
|
test: "redis-cli ping"
|
|
interval: 5s
|
|
retries: 20
|
|
|
|
networks:
|
|
db:
|
|
name: postgres_db
|
|
external: true
|
|
ip6net:
|
|
name: ip6net
|
|
external: true
|
|
sharkey: |