From 6a3e256adfa1e7552fe2c8d6820fe4beaf2b029f Mon Sep 17 00:00:00 2001 From: Khiet Tam Nguyen <86177399+nktnet1@users.noreply.github.com> Date: Sat, 17 May 2025 19:20:46 +1000 Subject: [PATCH] feat(blueprint): added chibisafe template (#131) * feat(blueprint): added chibisafe template * chore: remove spacing * fix: use caddy as service name * fix: added default credentials * feat: added healthcheck and internal network * fix: remove expose * fix: documentation links --------- Co-authored-by: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> --- blueprints/chibisafe/chibisafe.svg | 90 +++++++++++++++++++++++++ blueprints/chibisafe/docker-compose.yml | 69 +++++++++++++++++++ blueprints/chibisafe/template.toml | 40 +++++++++++ meta.json | 15 +++++ 4 files changed, 214 insertions(+) create mode 100644 blueprints/chibisafe/chibisafe.svg create mode 100644 blueprints/chibisafe/docker-compose.yml create mode 100644 blueprints/chibisafe/template.toml diff --git a/blueprints/chibisafe/chibisafe.svg b/blueprints/chibisafe/chibisafe.svg new file mode 100644 index 00000000..03fc3709 --- /dev/null +++ b/blueprints/chibisafe/chibisafe.svg @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/blueprints/chibisafe/docker-compose.yml b/blueprints/chibisafe/docker-compose.yml new file mode 100644 index 00000000..573cb16a --- /dev/null +++ b/blueprints/chibisafe/docker-compose.yml @@ -0,0 +1,69 @@ +# https://chibisafe.app/docs/intro +# +# Default Credentials +# USERNAME: admin +# PASSWORD: admin +services: + chibisafe: + image: chibisafe/chibisafe:latest + networks: + - chibinet + environment: + - BASE_API_URL=http://chibisafe_server:8000 + restart: unless-stopped + 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:latest + networks: + - chibinet + volumes: + - database:/app/database:rw + - uploads:/app/uploads:rw + - logs:/app/logs:rw + restart: unless-stopped + 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 + networks: + - chibinet + volumes: + - ../files/Caddyfile:/etc/caddy/Caddyfile:ro + - uploads:/app/uploads:ro + environment: + - BASE_URL=":80" + restart: unless-stopped + healthcheck: + test: ["CMD", "wget", "--spider", "--quiet", "http://127.0.0.1:80"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 10s + +volumes: + database: + uploads: + logs: + +networks: + chibinet: + driver: bridge + internal: true diff --git a/blueprints/chibisafe/template.toml b/blueprints/chibisafe/template.toml new file mode 100644 index 00000000..df353aaf --- /dev/null +++ b/blueprints/chibisafe/template.toml @@ -0,0 +1,40 @@ +[variables] +main_domain = "${domain}" + +[[config.domains]] +serviceName = "caddy" +port = 80 +host = "${main_domain}" + + +[[config.mounts]] +filePath = "./Caddyfile" +content = """ +# chibisafe/Caddyfile +# https://chibisafe.app/docs/installation/running-with-docker +{$BASE_URL} { + 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} + } + } +} +""" diff --git a/meta.json b/meta.json index c01357f2..269b2859 100644 --- a/meta.json +++ b/meta.json @@ -2349,6 +2349,21 @@ ] }, { + + "id": "chibisafe", + "name": "Chibisafe", + "version": "latest", + "description": "A beautiful and performant vault to save all your files in the cloud.", + "logo": "chibisafe.svg", + "links": { + "github": "https://github.com/chibisafe/chibisafe", + "website": "https://chibisafe.app", + "docs": "https://chibisafe.app/docs/intro" + }, + "tags": ["media system", "storage", "file-sharing"] + }, + { + "id": "rybbit", "name": "Rybbit", "version": "latest",