131 lines
3.8 KiB
YAML
131 lines
3.8 KiB
YAML
networks:
|
|
reverse_proxy:
|
|
external: true
|
|
|
|
configs:
|
|
lemmy_customPostgresql.sql:
|
|
external: true
|
|
|
|
secrets:
|
|
lemmy_lemmy.hjson:
|
|
external: true
|
|
lemmy_postgres_pass.txt:
|
|
external: true
|
|
lemmy_pictrs.toml:
|
|
external: true
|
|
|
|
volumes:
|
|
ui_themes:
|
|
pictrs:
|
|
db:
|
|
|
|
services:
|
|
lemmy:
|
|
image: dessalines/lemmy:0.19.8
|
|
restart: always
|
|
networks:
|
|
- default
|
|
- reverse_proxy
|
|
environment:
|
|
- RUST_LOG="info"
|
|
secrets:
|
|
- source: lemmy_lemmy.hjson
|
|
target: /config/config.hjson
|
|
deploy:
|
|
rollback_config:
|
|
failure_action: continue
|
|
update_config:
|
|
delay: 2s
|
|
failure_action: rollback
|
|
order: start-first
|
|
placement:
|
|
constraints:
|
|
- node.labels.services_kind==${SERVICE_KIND:-common}
|
|
labels:
|
|
- traefik.enable=true
|
|
- traefik.http.routers.lemmy.rule=Host(`lemmy.alecodes.page`) && (PathRegexp(`^/(api|pictrs|feeds|nodeinfo|\\.well-known)`) || HeaderRegexp(`Accept`, `^application/.*`))
|
|
- traefik.http.services.lemmy.loadbalancer.server.port=8536
|
|
- traefik.http.middlewares.lemmy-max-bodysize.buffering.maxRequestBodyBytes=20971520 # 20M
|
|
- traefik.http.routers.lemmy.middlewares=lemmy-max-bodysize
|
|
|
|
lemmy_ui:
|
|
image: dessalines/lemmy-ui:0.19.8
|
|
restart: always
|
|
networks:
|
|
- default
|
|
- reverse_proxy
|
|
environment:
|
|
- LEMMY_UI_LEMMY_INTERNAL_HOST=tasks.lemmy:8536
|
|
- LEMMY_UI_LEMMY_EXTERNAL_HOST=lemmy.alecodes.page
|
|
- LEMMY_UI_HTTPS=true
|
|
volumes:
|
|
- ui_themes:/app/extra_themes
|
|
deploy:
|
|
rollback_config:
|
|
failure_action: continue
|
|
update_config:
|
|
delay: 2s
|
|
failure_action: rollback
|
|
order: start-first
|
|
placement:
|
|
constraints:
|
|
- node.labels.services_kind==${SERVICE_KIND:-common}
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.middlewares.lemmy-ui-client-max-bodysize.buffering.maxRequestBodyBytes=20971520" # 20M
|
|
- "traefik.http.routers.lemmy-ui.middlewares=lemmy-ui-client-max-bodysize"
|
|
- "traefik.http.routers.lemmy-ui.rule=Host(`lemmy.alecodes.page`)"
|
|
- "traefik.http.routers.lemmy-ui.service=lemmy-ui"
|
|
- "traefik.http.services.lemmy-ui.loadbalancer.server.port=1234"
|
|
|
|
- "traefik.http.routers.lemmy-security-txt.rule=Host(`lemmy.alecodes.page`) && Path(`/.well-known/security.txt`)"
|
|
- "traefik.http.routers.lemmy-security-txt.service=lemmy-security-txt"
|
|
- "traefik.http.services.lemmy-security-txt.loadbalancer.server.port=1234"
|
|
|
|
pictrs:
|
|
image: asonix/pictrs:0.5.16
|
|
restart: always
|
|
# this needs to match the pictrs url in lemmy_lemmy.hjson
|
|
entrypoint: /sbin/tini -- /usr/local/bin/pict-rs -c /run/secrets/lemmy_pictrs.toml run
|
|
secrets:
|
|
- lemmy_pictrs.toml
|
|
environment:
|
|
- RUST_BACKTRACE=full
|
|
user: 991:991
|
|
volumes:
|
|
- pictrs:/mnt:Z
|
|
deploy:
|
|
rollback_config:
|
|
failure_action: continue
|
|
update_config:
|
|
delay: 2s
|
|
failure_action: rollback
|
|
order: start-first
|
|
placement:
|
|
constraints:
|
|
- node.labels.services_kind==${SERVICE_KIND:-common}
|
|
|
|
lemmy_db:
|
|
image: pgautoupgrade/pgautoupgrade:17-bookworm
|
|
restart: always
|
|
secrets:
|
|
- lemmy_postgres_pass.txt
|
|
configs:
|
|
- source: lemmy_customPostgresql.sql
|
|
target: /docker-entrypoint-initdb.d/config.sql
|
|
environment:
|
|
- POSTGRES_USER=lemmy
|
|
- POSTGRES_PASSWORD_FILE=/run/secrets/lemmy_postgres_pass.txt
|
|
- POSTGRES_DB=lemmy
|
|
volumes:
|
|
- db:/var/lib/postgresql/data:Z
|
|
deploy:
|
|
rollback_config:
|
|
failure_action: continue
|
|
update_config:
|
|
delay: 2s
|
|
failure_action: rollback
|
|
order: start-first
|
|
placement:
|
|
constraints:
|
|
- node.labels.services_kind==${SERVICE_KIND:-common}
|