From cd1c333a6f2235767a329c4aa21aa53aad4729d6 Mon Sep 17 00:00:00 2001 From: Khiet Tam Nguyen <86177399+nktnet1@users.noreply.github.com> Date: Tue, 13 Jan 2026 08:51:57 +1100 Subject: [PATCH] feat(service): add chibisafe template (#5808) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 🏔️ Peak <122374094+peaklabs-dev@users.noreply.github.com> Co-authored-by: ShadowArcanist <162910371+ShadowArcanist@users.noreply.github.com> --- public/svgs/chibisafe.svg | 90 ++++++++++++++++++++++++++++++++ templates/compose/chibisafe.yaml | 80 ++++++++++++++++++++++++++++ 2 files changed, 170 insertions(+) create mode 100644 public/svgs/chibisafe.svg create mode 100644 templates/compose/chibisafe.yaml diff --git a/public/svgs/chibisafe.svg b/public/svgs/chibisafe.svg new file mode 100644 index 000000000..03fc3709a --- /dev/null +++ b/public/svgs/chibisafe.svg @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/templates/compose/chibisafe.yaml b/templates/compose/chibisafe.yaml new file mode 100644 index 000000000..62ced7a80 --- /dev/null +++ b/templates/compose/chibisafe.yaml @@ -0,0 +1,80 @@ +# documentation: https://chibisafe.app/docs/intro +# slogan: A beautiful and performant vault to save all your files in the cloud. +# tags: storage,file-sharing,upload,sharing +# logo: svgs/chibisafe.svg +# port: 80 + +## This service includes its own reverse proxy because the application routing is broken, also it needs caddy for serving static files https://github.com/coollabsio/coolify/pull/5808#pullrequestreview-3340419006 + +services: + chibisafe: + image: chibisafe/chibisafe:v6.5.5 + environment: + - BASE_API_URL=http://chibisafe-server:8000 + healthcheck: + test: ["CMD", "wget", "--spider", "--quiet", "http://127.0.0.1:8001"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 10s + + chibisafe-server: + image: chibisafe/chibisafe-server:v6.5.5 + volumes: + - chibisafe-database:/app/database:rw + - chibisafe-uploads:/app/uploads:rw + - chibisafe-logs:/app/logs:rw + healthcheck: + test: + [ + "CMD", + "wget", + "--spider", + "--quiet", + "http://127.0.0.1:8000/api/health", + ] + interval: 30s + timeout: 10s + retries: 3 + start_period: 10s + + caddy: + image: caddy:2-alpine + environment: + - SERVICE_URL_CHIBISAFE_80 + healthcheck: + test: ["CMD", "wget", "--spider", "--quiet", "http://127.0.0.1:80"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 10s + volumes: + - uploads:/app/uploads:ro + - type: bind + source: ./Caddyfile + target: /etc/caddy/Caddyfile + content: | + # chibisafe/Caddyfile + # https://chibisafe.moe/guides/running-with-docker + :80 { + route { + file_server * { + root /app/uploads + pass_thru + } + @api path /api/* + reverse_proxy @api http://chibisafe-server:8000 { + header_up Host {http.reverse_proxy.upstream.hostport} + header_up X-Real-IP {http.request.header.X-Real-IP} + } + @docs path /docs* + reverse_proxy @docs http://chibisafe-server:8000 { + header_up Host {http.reverse_proxy.upstream.hostport} + header_up X-Real-IP {http.request.header.X-Real-IP} + } + reverse_proxy http://chibisafe:8001 { + header_up Host {http.reverse_proxy.upstream.hostport} + header_up X-Real-IP {http.request.header.X-Real-IP} + } + } + }