Files
templates/blueprints/struxa/template.toml
Jakub Krzyżanowski 08d87d8a90 feat: add struxa template (#1037)
* feat: add struxa template

Adds a Dokploy blueprint for Struxa (github.com/struxadotcloud/struxa),
a self-hosted, open-source server management panel. Deploys the
published GHCR images (dashboard, watchkeeper, migrate) plus MySQL
and MinIO sidecars. The web service generates its RS256 JWT keypair
at startup via Node's built-in crypto module, since no Dokploy
template helper covers RSA key generation.

* fix: pin struxa images to latest floating tag

struxa's release workflow pushes a latest floating tag alongside
version tags on every stable release, matching the convention used
by ~44% of existing blueprints (version: "latest" in meta.json).

* fix: generate a 64-char DATABASE_ENCRYPTION_KEY

Dokploy's runtime \${hash:N} helper produces N hex characters, not N
bytes (the templates repo's local preview helpers.ts models it as
byte count, which is inconsistent with the platform). struxa's env
schema requires DATABASE_ENCRYPTION_KEY to be >=64 chars (it's hex
decoded to a 32-byte AES-256 key), so \${hash:32} only produced half
the required length. Confirmed against other blueprints (sim,
chatwoot, outline) which all use \${hash:64} for 64-char secrets.

* fix: address Copilot review comments

- Add explicit \`version: "3.8"\` to docker-compose.yml, matching the
  documented template format.
- Pin minio/minio to a specific RELEASE tag (used elsewhere in the
  repo: plane, posthog) instead of the floating latest tag.
- Default BETTER_AUTH_URL/APP_URL/CORS_ORIGIN to http://, matching
  repo convention for Dokploy-fronted apps (TLS terminates at the
  proxy).

* fix: rename web service to struxa

AGENTS.md convention: the primary Docker service name should match
the blueprint folder name. Renamed the web/dashboard service from
"web" to "struxa" in docker-compose.yml and updated
template.toml's config.domains.serviceName to match.
2026-07-19 19:19:42 -06:00

35 lines
974 B
TOML

[variables]
main_domain = "${domain}"
image_tag = "latest"
mysql_root_password = "${password:32}"
mysql_password = "${password:32}"
better_auth_secret = "${base64:32}"
db_encryption_key = "${hash:64}"
minio_access_key = "${username}"
minio_secret_key = "${password:32}"
[config]
env = [
"IMAGE_TAG=${image_tag}",
"MYSQL_ROOT_PASSWORD=${mysql_root_password}",
"MYSQL_DATABASE=struxa",
"MYSQL_USER=struxa",
"MYSQL_PASSWORD=${mysql_password}",
"DATABASE_URL=mysql://struxa:${mysql_password}@mysql:3306/struxa",
"BETTER_AUTH_SECRET=${better_auth_secret}",
"BETTER_AUTH_URL=http://${main_domain}",
"APP_URL=http://${main_domain}",
"CORS_ORIGIN=http://${main_domain}",
"DATABASE_ENCRYPTION_KEY=${db_encryption_key}",
"MINIO_ENDPOINT=http://minio:9000",
"MINIO_ACCESS_KEY=${minio_access_key}",
"MINIO_SECRET_KEY=${minio_secret_key}",
"MINIO_BUCKET=struxa",
]
mounts = []
[[config.domains]]
serviceName = "struxa"
port = 3001
host = "${main_domain}"