From e739285eaa24a7cb2ab3d5f6a3cf4aa54a49a506 Mon Sep 17 00:00:00 2001 From: Khiet Tam Nguyen <86177399+nktnet1@users.noreply.github.com> Date: Fri, 18 Apr 2025 06:39:04 +1000 Subject: [PATCH] feat: add One Time Secret template (#79) * feat: added one time secret template * fix: updated meta.json and added svg * chore: remove hardcoded variables --- blueprints/onetimesecret/docker-compose.yml | 45 +++++++++++++++++++++ blueprints/onetimesecret/onetimesecret.svg | 6 +++ blueprints/onetimesecret/template.toml | 15 +++++++ meta.json | 18 +++++++++ 4 files changed, 84 insertions(+) create mode 100644 blueprints/onetimesecret/docker-compose.yml create mode 100644 blueprints/onetimesecret/onetimesecret.svg create mode 100644 blueprints/onetimesecret/template.toml diff --git a/blueprints/onetimesecret/docker-compose.yml b/blueprints/onetimesecret/docker-compose.yml new file mode 100644 index 0000000..1d8e6fa --- /dev/null +++ b/blueprints/onetimesecret/docker-compose.yml @@ -0,0 +1,45 @@ +services: + onetimesecret-redis: + image: redis:7-alpine + command: redis-server --requirepass ${REDIS_PASSWORD} + restart: unless-stopped + healthcheck: + test: + - CMD + - redis-cli + - ping + interval: 30s + timeout: 10s + retries: 3 + + onetimesecret: + image: 'onetimesecret/onetimesecret:latest' + restart: unless-stopped + environment: + # To see all available environment variables, visit: + # https://github.com/onetimesecret/onetimesecret/blob/develop/etc/config.example.yaml + - AUTH_AUTOVERIFY=true + - AUTH_SIGNUP=true + + # Accounts created with this email address will have admin access + - COLONEL=${COLONEL} + + # If you change your domain, make sure to update the HOST environment variable. + - HOST=${HOST} + + - RACK_ENV=production + - REDIS_URL=redis://:${REDIS_PASSWORD}@onetimesecret-redis:6379/0 + - SECRET=${SECRET} + - SSL=true + depends_on: + - onetimesecret-redis + healthcheck: + test: + - CMD + - ruby + - '-rnet/http' + - '-e' + - "exit(Net::HTTP.get_response(URI('http://localhost:3000')).is_a?(Net::HTTPSuccess) ? 0 : 1)" + interval: 30s + timeout: 10s + retries: 3 diff --git a/blueprints/onetimesecret/onetimesecret.svg b/blueprints/onetimesecret/onetimesecret.svg new file mode 100644 index 0000000..eff9738 --- /dev/null +++ b/blueprints/onetimesecret/onetimesecret.svg @@ -0,0 +1,6 @@ + + +Onetime Secret + + + diff --git a/blueprints/onetimesecret/template.toml b/blueprints/onetimesecret/template.toml new file mode 100644 index 0000000..4e1f460 --- /dev/null +++ b/blueprints/onetimesecret/template.toml @@ -0,0 +1,15 @@ +[variables] +main_domain = "${domain}" +secret = "${password:30}" +redis_password = "${password:30}" + +[[config.domains]] +serviceName = "onetimesecret" +port = 3000 +host = "${main_domain}" + +[config.env] +COLONEL="admin@example.com" +HOST="${main_domain}" +REDIS_PASSWORD = "${redis_password}" +SECRET="${secret}" diff --git a/meta.json b/meta.json index 9853545..06a36f6 100644 --- a/meta.json +++ b/meta.json @@ -2700,5 +2700,23 @@ "tags": [ "network" ] + }, + { + "id": "onetimesecret", + "name": "One Time Secret", + "version": "latest", + "description": "Share sensitive information securely with self-destructing links that are only viewable once.", + "logo": "onetimesecret.svg", + "links": { + "github": "https://github.com/onetimesecret/onetimesecret", + "website": "https://onetimesecret.com", + "docs": "https://docs.onetimesecret.com" + }, + "tags": [ + "auth", + "password", + "secret", + "secure" + ] } ]