You need to sign in or sign up before continuing.

@percher/core 0.4.29 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (293) hide show
  1. package/LICENSE +132 -0
  2. package/dist/appstore-artifacts.d.ts +8 -0
  3. package/dist/appstore-artifacts.d.ts.map +1 -1
  4. package/dist/appstore-artifacts.js +11 -15
  5. package/dist/appstore-artifacts.js.map +1 -1
  6. package/dist/commands/account.d.ts +1 -1
  7. package/dist/commands/account.js +3 -3
  8. package/dist/commands/account.js.map +1 -1
  9. package/dist/commands/admin-legacy-audit.d.ts +40 -0
  10. package/dist/commands/admin-legacy-audit.d.ts.map +1 -0
  11. package/dist/commands/admin-legacy-audit.js +57 -0
  12. package/dist/commands/admin-legacy-audit.js.map +1 -0
  13. package/dist/commands/admin-legacy-inventory.d.ts +27 -0
  14. package/dist/commands/admin-legacy-inventory.d.ts.map +1 -0
  15. package/dist/commands/admin-legacy-inventory.js +37 -0
  16. package/dist/commands/admin-legacy-inventory.js.map +1 -0
  17. package/dist/commands/admin-migrate-networks.d.ts +15 -0
  18. package/dist/commands/admin-migrate-networks.d.ts.map +1 -0
  19. package/dist/commands/admin-migrate-networks.js +15 -0
  20. package/dist/commands/admin-migrate-networks.js.map +1 -0
  21. package/dist/commands/appstore-kit.d.ts +1 -1
  22. package/dist/commands/appstore-kit.js +1 -1
  23. package/dist/commands/data-export.d.ts.map +1 -1
  24. package/dist/commands/data-export.js +5 -4
  25. package/dist/commands/data-export.js.map +1 -1
  26. package/dist/commands/doctor.d.ts +19 -0
  27. package/dist/commands/doctor.d.ts.map +1 -1
  28. package/dist/commands/doctor.js +58 -9
  29. package/dist/commands/doctor.js.map +1 -1
  30. package/dist/commands/mcp.d.ts +4 -4
  31. package/dist/commands/mcp.d.ts.map +1 -1
  32. package/dist/commands/mcp.js +28 -8
  33. package/dist/commands/mcp.js.map +1 -1
  34. package/dist/commands/migrate-supabase-map.d.ts +1 -1
  35. package/dist/commands/migrate-supabase-schema.d.ts +4 -1
  36. package/dist/commands/migrate-supabase-schema.d.ts.map +1 -1
  37. package/dist/commands/migrate-supabase-schema.js +4 -1
  38. package/dist/commands/migrate-supabase-schema.js.map +1 -1
  39. package/dist/commands/migrate-supabase-sdk.d.ts +1 -1
  40. package/dist/commands/migrate-supabase.d.ts +1 -1
  41. package/dist/commands/migrate-supabase.js +1 -1
  42. package/dist/commands/publish-api-error.d.ts +12 -2
  43. package/dist/commands/publish-api-error.d.ts.map +1 -1
  44. package/dist/commands/publish-api-error.js +128 -5
  45. package/dist/commands/publish-api-error.js.map +1 -1
  46. package/dist/commands/publish-failure.d.ts.map +1 -1
  47. package/dist/commands/publish-failure.js +47 -32
  48. package/dist/commands/publish-failure.js.map +1 -1
  49. package/dist/commands/publish-inline.js +1 -1
  50. package/dist/commands/publish.d.ts.map +1 -1
  51. package/dist/commands/publish.js +48 -10
  52. package/dist/commands/publish.js.map +1 -1
  53. package/dist/commands/push.d.ts.map +1 -1
  54. package/dist/commands/push.js +11 -1
  55. package/dist/commands/push.js.map +1 -1
  56. package/dist/commands/rollback.d.ts +2 -1
  57. package/dist/commands/rollback.d.ts.map +1 -1
  58. package/dist/commands/rollback.js +74 -4
  59. package/dist/commands/rollback.js.map +1 -1
  60. package/dist/commands/versions.d.ts +12 -0
  61. package/dist/commands/versions.d.ts.map +1 -1
  62. package/dist/commands/versions.js.map +1 -1
  63. package/dist/commands/wait-deploy.d.ts +1 -1
  64. package/dist/error-classifier.d.ts +1 -1
  65. package/dist/error-classifier.d.ts.map +1 -1
  66. package/dist/error-classifier.js +66 -0
  67. package/dist/error-classifier.js.map +1 -1
  68. package/dist/errors.d.ts +1 -1
  69. package/dist/errors.d.ts.map +1 -1
  70. package/dist/errors.js.map +1 -1
  71. package/dist/event-renderer.d.ts.map +1 -1
  72. package/dist/event-renderer.js +12 -2
  73. package/dist/event-renderer.js.map +1 -1
  74. package/dist/index.d.ts +5 -1
  75. package/dist/index.d.ts.map +1 -1
  76. package/dist/index.js +8 -1
  77. package/dist/index.js.map +1 -1
  78. package/dist/plans.d.ts +23 -1
  79. package/dist/plans.d.ts.map +1 -1
  80. package/dist/plans.js +26 -1
  81. package/dist/plans.js.map +1 -1
  82. package/dist/publish-retry.d.ts.map +1 -1
  83. package/dist/publish-retry.js +26 -1
  84. package/dist/publish-retry.js.map +1 -1
  85. package/dist/recovery.d.ts +25 -2
  86. package/dist/recovery.d.ts.map +1 -1
  87. package/dist/recovery.js +59 -4
  88. package/dist/recovery.js.map +1 -1
  89. package/dist/static-docker.d.ts +8 -13
  90. package/dist/static-docker.d.ts.map +1 -1
  91. package/dist/static-docker.js +38 -27
  92. package/dist/static-docker.js.map +1 -1
  93. package/dist/stream-utils.d.ts +9 -14
  94. package/dist/stream-utils.d.ts.map +1 -1
  95. package/dist/stream-utils.js +164 -0
  96. package/dist/stream-utils.js.map +1 -1
  97. package/dist/structured-error-codes.d.ts +1 -1
  98. package/dist/structured-error-codes.d.ts.map +1 -1
  99. package/dist/structured-error-codes.js +123 -0
  100. package/dist/structured-error-codes.js.map +1 -1
  101. package/dist/templates/ai-files/claude-md.d.ts.map +1 -1
  102. package/dist/templates/ai-files/claude-md.js +18 -1
  103. package/dist/templates/ai-files/claude-md.js.map +1 -1
  104. package/dist/templates/ai-files/cursor-percher-mdc.d.ts.map +1 -1
  105. package/dist/templates/ai-files/cursor-percher-mdc.js +18 -1
  106. package/dist/templates/ai-files/cursor-percher-mdc.js.map +1 -1
  107. package/package.json +8 -7
  108. package/templates/LICENSE +14 -0
  109. package/templates/astro/Caddyfile +6 -0
  110. package/templates/astro/Dockerfile +51 -0
  111. package/templates/astro/PERCHER-TEMPLATE-LICENSE.txt +14 -0
  112. package/templates/astro/astro.config.mjs +3 -0
  113. package/templates/astro/package.json +14 -0
  114. package/templates/astro/percher.toml +11 -0
  115. package/templates/astro/src/pages/index.astro +15 -0
  116. package/templates/bun/PERCHER-TEMPLATE-LICENSE.txt +14 -0
  117. package/templates/bun/index.ts +23 -0
  118. package/templates/bun/package.json +8 -0
  119. package/templates/bun/percher.toml +10 -0
  120. package/templates/capsule/Caddyfile +7 -0
  121. package/templates/capsule/Dockerfile +57 -0
  122. package/templates/capsule/PERCHER-TEMPLATE-LICENSE.txt +14 -0
  123. package/templates/capsule/index.html +12 -0
  124. package/templates/capsule/package.json +20 -0
  125. package/templates/capsule/pb/schema.json +18 -0
  126. package/templates/capsule/percher.toml +13 -0
  127. package/templates/capsule/src/App.tsx +65 -0
  128. package/templates/capsule/src/components/Auth.tsx +75 -0
  129. package/templates/capsule/src/components/SignInWithGoogle.tsx +27 -0
  130. package/templates/capsule/src/lib/ai-client.ts +193 -0
  131. package/templates/capsule/src/lib/ai.ts +15 -0
  132. package/templates/capsule/src/lib/db.ts +14 -0
  133. package/templates/capsule/src/lib/realtime.ts +16 -0
  134. package/templates/capsule/src/main.tsx +5 -0
  135. package/templates/capsule/tsconfig.json +15 -0
  136. package/templates/capsule/vite.config.ts +6 -0
  137. package/templates/django/PERCHER-TEMPLATE-LICENSE.txt +14 -0
  138. package/templates/django/Procfile +1 -0
  139. package/templates/django/app/__init__.py +0 -0
  140. package/templates/django/app/settings.py +44 -0
  141. package/templates/django/app/urls.py +21 -0
  142. package/templates/django/app/wsgi.py +5 -0
  143. package/templates/django/manage.py +19 -0
  144. package/templates/django/percher.toml +12 -0
  145. package/templates/django/requirements.txt +2 -0
  146. package/templates/dotnet/Dockerfile +18 -0
  147. package/templates/dotnet/PERCHER-TEMPLATE-LICENSE.txt +14 -0
  148. package/templates/dotnet/Program.cs +23 -0
  149. package/templates/dotnet/app.csproj +9 -0
  150. package/templates/dotnet/percher.toml +11 -0
  151. package/templates/eleventy/.eleventy.js +12 -0
  152. package/templates/eleventy/Caddyfile +6 -0
  153. package/templates/eleventy/Dockerfile +51 -0
  154. package/templates/eleventy/PERCHER-TEMPLATE-LICENSE.txt +14 -0
  155. package/templates/eleventy/package.json +12 -0
  156. package/templates/eleventy/percher.toml +11 -0
  157. package/templates/eleventy/src/_includes/base.njk +12 -0
  158. package/templates/eleventy/src/assets/style.css +12 -0
  159. package/templates/eleventy/src/index.md +10 -0
  160. package/templates/elysia/PERCHER-TEMPLATE-LICENSE.txt +14 -0
  161. package/templates/elysia/index.ts +8 -0
  162. package/templates/elysia/package.json +12 -0
  163. package/templates/elysia/percher.toml +11 -0
  164. package/templates/express/PERCHER-TEMPLATE-LICENSE.txt +14 -0
  165. package/templates/express/index.ts +16 -0
  166. package/templates/express/package.json +12 -0
  167. package/templates/express/percher.toml +11 -0
  168. package/templates/fastify/PERCHER-TEMPLATE-LICENSE.txt +14 -0
  169. package/templates/fastify/index.ts +13 -0
  170. package/templates/fastify/package.json +12 -0
  171. package/templates/fastify/percher.toml +11 -0
  172. package/templates/flask/PERCHER-TEMPLATE-LICENSE.txt +14 -0
  173. package/templates/flask/main.py +23 -0
  174. package/templates/flask/percher.toml +12 -0
  175. package/templates/flask/requirements.txt +2 -0
  176. package/templates/go/Dockerfile +11 -0
  177. package/templates/go/PERCHER-TEMPLATE-LICENSE.txt +14 -0
  178. package/templates/go/go.mod +3 -0
  179. package/templates/go/main.go +53 -0
  180. package/templates/go/percher.toml +11 -0
  181. package/templates/hono/PERCHER-TEMPLATE-LICENSE.txt +14 -0
  182. package/templates/hono/index.ts +14 -0
  183. package/templates/hono/package.json +13 -0
  184. package/templates/hono/percher.toml +11 -0
  185. package/templates/htmx/PERCHER-TEMPLATE-LICENSE.txt +14 -0
  186. package/templates/htmx/index.ts +32 -0
  187. package/templates/htmx/package.json +15 -0
  188. package/templates/htmx/percher.toml +11 -0
  189. package/templates/hugo/Caddyfile +6 -0
  190. package/templates/hugo/Dockerfile +49 -0
  191. package/templates/hugo/PERCHER-TEMPLATE-LICENSE.txt +14 -0
  192. package/templates/hugo/content/_index.md +7 -0
  193. package/templates/hugo/hugo.toml +11 -0
  194. package/templates/hugo/layouts/index.html +22 -0
  195. package/templates/hugo/percher.toml +11 -0
  196. package/templates/java/Dockerfile +15 -0
  197. package/templates/java/Main.java +77 -0
  198. package/templates/java/PERCHER-TEMPLATE-LICENSE.txt +14 -0
  199. package/templates/java/percher.toml +11 -0
  200. package/templates/laravel/Dockerfile +19 -0
  201. package/templates/laravel/PERCHER-TEMPLATE-LICENSE.txt +14 -0
  202. package/templates/laravel/composer.json +15 -0
  203. package/templates/laravel/percher.toml +11 -0
  204. package/templates/laravel/public/index.php +37 -0
  205. package/templates/nextjs/PERCHER-TEMPLATE-LICENSE.txt +14 -0
  206. package/templates/nextjs/app/api/health/route.ts +3 -0
  207. package/templates/nextjs/app/layout.tsx +11 -0
  208. package/templates/nextjs/app/page.tsx +10 -0
  209. package/templates/nextjs/next.config.mjs +8 -0
  210. package/templates/nextjs/package.json +21 -0
  211. package/templates/nextjs/percher.toml +15 -0
  212. package/templates/node/PERCHER-TEMPLATE-LICENSE.txt +14 -0
  213. package/templates/node/index.js +26 -0
  214. package/templates/node/package.json +8 -0
  215. package/templates/node/percher.toml +10 -0
  216. package/templates/nuxt/PERCHER-TEMPLATE-LICENSE.txt +14 -0
  217. package/templates/nuxt/app.vue +6 -0
  218. package/templates/nuxt/nuxt.config.ts +4 -0
  219. package/templates/nuxt/package.json +15 -0
  220. package/templates/nuxt/percher.toml +15 -0
  221. package/templates/nuxt/server/api/health.ts +1 -0
  222. package/templates/phoenix/Dockerfile +15 -0
  223. package/templates/phoenix/PERCHER-TEMPLATE-LICENSE.txt +14 -0
  224. package/templates/phoenix/lib/application.ex +15 -0
  225. package/templates/phoenix/lib/router.ex +39 -0
  226. package/templates/phoenix/mix.exs +30 -0
  227. package/templates/phoenix/percher.toml +11 -0
  228. package/templates/preact/Caddyfile +7 -0
  229. package/templates/preact/Dockerfile +51 -0
  230. package/templates/preact/PERCHER-TEMPLATE-LICENSE.txt +14 -0
  231. package/templates/preact/index.html +12 -0
  232. package/templates/preact/package.json +19 -0
  233. package/templates/preact/percher.toml +11 -0
  234. package/templates/preact/src/main.tsx +13 -0
  235. package/templates/preact/vite.config.ts +6 -0
  236. package/templates/python/PERCHER-TEMPLATE-LICENSE.txt +14 -0
  237. package/templates/python/main.py +13 -0
  238. package/templates/python/nixpacks.toml +8 -0
  239. package/templates/python/percher.toml +12 -0
  240. package/templates/python/requirements.txt +2 -0
  241. package/templates/rails/Dockerfile +11 -0
  242. package/templates/rails/Gemfile +12 -0
  243. package/templates/rails/PERCHER-TEMPLATE-LICENSE.txt +14 -0
  244. package/templates/rails/config.ru +32 -0
  245. package/templates/rails/percher.toml +11 -0
  246. package/templates/remix/PERCHER-TEMPLATE-LICENSE.txt +14 -0
  247. package/templates/remix/app/root.tsx +19 -0
  248. package/templates/remix/app/routes/_index.tsx +10 -0
  249. package/templates/remix/app/routes/health.tsx +5 -0
  250. package/templates/remix/package.json +30 -0
  251. package/templates/remix/percher.toml +15 -0
  252. package/templates/remix/vite.config.ts +7 -0
  253. package/templates/rust/Cargo.toml +19 -0
  254. package/templates/rust/Dockerfile +18 -0
  255. package/templates/rust/PERCHER-TEMPLATE-LICENSE.txt +14 -0
  256. package/templates/rust/percher.toml +11 -0
  257. package/templates/rust/src/main.rs +45 -0
  258. package/templates/solid/Caddyfile +7 -0
  259. package/templates/solid/Dockerfile +51 -0
  260. package/templates/solid/PERCHER-TEMPLATE-LICENSE.txt +14 -0
  261. package/templates/solid/index.html +12 -0
  262. package/templates/solid/package.json +19 -0
  263. package/templates/solid/percher.toml +11 -0
  264. package/templates/solid/src/main.tsx +13 -0
  265. package/templates/solid/vite.config.ts +6 -0
  266. package/templates/static/PERCHER-TEMPLATE-LICENSE.txt +14 -0
  267. package/templates/static/index.html +15 -0
  268. package/templates/static/percher.toml +6 -0
  269. package/templates/static/style.css +32 -0
  270. package/templates/sveltekit/PERCHER-TEMPLATE-LICENSE.txt +14 -0
  271. package/templates/sveltekit/package.json +19 -0
  272. package/templates/sveltekit/percher.toml +15 -0
  273. package/templates/sveltekit/src/app.html +12 -0
  274. package/templates/sveltekit/src/routes/+page.svelte +2 -0
  275. package/templates/sveltekit/src/routes/health/+server.ts +5 -0
  276. package/templates/sveltekit/svelte.config.js +8 -0
  277. package/templates/sveltekit/vite.config.js +6 -0
  278. package/templates/vite-react/Caddyfile +7 -0
  279. package/templates/vite-react/Dockerfile +51 -0
  280. package/templates/vite-react/PERCHER-TEMPLATE-LICENSE.txt +14 -0
  281. package/templates/vite-react/index.html +12 -0
  282. package/templates/vite-react/package.json +22 -0
  283. package/templates/vite-react/percher.toml +11 -0
  284. package/templates/vite-react/src/main.tsx +20 -0
  285. package/templates/vite-react/vite.config.ts +6 -0
  286. package/templates/vite-vue/Caddyfile +7 -0
  287. package/templates/vite-vue/Dockerfile +51 -0
  288. package/templates/vite-vue/PERCHER-TEMPLATE-LICENSE.txt +14 -0
  289. package/templates/vite-vue/index.html +12 -0
  290. package/templates/vite-vue/package.json +19 -0
  291. package/templates/vite-vue/percher.toml +11 -0
  292. package/templates/vite-vue/src/main.ts +12 -0
  293. package/templates/vite-vue/vite.config.ts +6 -0
@@ -0,0 +1,12 @@
1
+ module.exports = (eleventyConfig) => {
2
+ eleventyConfig.addPassthroughCopy("src/assets");
3
+ return {
4
+ dir: {
5
+ input: "src",
6
+ output: "_site",
7
+ includes: "_includes",
8
+ },
9
+ markdownTemplateEngine: "njk",
10
+ htmlTemplateEngine: "njk",
11
+ };
12
+ };
@@ -0,0 +1,6 @@
1
+ :8080 {
2
+ bind 0.0.0.0
3
+ root * /srv
4
+ encode gzip zstd
5
+ file_server
6
+ }
@@ -0,0 +1,51 @@
1
+ # Multi-stage build: a Bun stage compiles the static bundle, then a
2
+ # minimal Caddy image serves it. This project uses runtime = "docker"
3
+ # (not "static") because Percher's static runtime serves pre-built
4
+ # files only — it does not run a build command. Generated by Percher;
5
+ # safe to edit and own.
6
+
7
+ # --- Build stage: install deps and build the static bundle -----------
8
+ FROM oven/bun:1-alpine AS build
9
+ WORKDIR /app
10
+ COPY . .
11
+ RUN bun install && bun run build
12
+
13
+ # --- Serve stage: minimal Caddy image --------------------------------
14
+ # Build pinned Caddy source with refreshed security modules. The scratch
15
+ # runtime carries no shell, package manager, or file capabilities and listens
16
+ # on the unprivileged port :8080.
17
+ FROM golang:1.26.7-alpine3.23@sha256:b17af760035fc2f338eed92d448a6c67f2d45438844fc6c60678fa5f99e44b57 AS caddy-source
18
+ ADD --checksum=sha256:78e660d838e45c0b8c89338b325946238f153641aa9925df9ef2ad5e8eced31b \
19
+ https://github.com/caddyserver/caddy/commit/b2693fb63a30e6d7be0972c3645e9a2c0a500e93.patch /tmp/caddy-cel-go.patch
20
+ RUN go mod download github.com/caddyserver/caddy/v2@v2.11.4 \
21
+ && cp -R /go/pkg/mod/github.com/caddyserver/caddy/v2@v2.11.4 /src \
22
+ && chmod -R u+w /src
23
+ WORKDIR /src
24
+ RUN apk add --no-cache patch \
25
+ && patch -p1 < /tmp/caddy-cel-go.patch \
26
+ && go get github.com/go-chi/chi/v5@v5.3.0 github.com/google/cel-go@v0.29.2 \
27
+ github.com/klauspost/compress@v1.18.7 go.opentelemetry.io/otel@v1.44.0 \
28
+ golang.org/x/crypto@v0.55.0 golang.org/x/net@v0.58.0 \
29
+ golang.org/x/text@v0.41.0 google.golang.org/grpc@v1.83.2 \
30
+ && go mod tidy \
31
+ && CGO_ENABLED=0 go build -trimpath -ldflags "-s -w" -o /out/caddy ./cmd/caddy \
32
+ && printf '%s\n' \
33
+ 'package main' \
34
+ 'import ("net/http"; "os"; "time")' \
35
+ 'func main(){ if len(os.Args)!=2 { os.Exit(2) }; c:=http.Client{Timeout:2500*time.Millisecond,Transport:&http.Transport{Proxy:nil},CheckRedirect:func(_ *http.Request,_ []*http.Request) error{return http.ErrUseLastResponse}}; r,e:=c.Get(os.Args[1]); if e!=nil { os.Exit(1) }; defer r.Body.Close(); if r.StatusCode!=http.StatusOK { os.Exit(1) } }' \
36
+ > /tmp/percher-healthcheck.go \
37
+ && CGO_ENABLED=0 go build -trimpath -ldflags "-s -w" -o /out/percher-healthcheck /tmp/percher-healthcheck.go
38
+ FROM scratch
39
+ COPY --from=caddy-source /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
40
+ COPY --from=caddy-source /out/caddy /usr/bin/caddy
41
+ COPY --from=caddy-source /out/percher-healthcheck /usr/bin/percher-healthcheck
42
+ COPY Caddyfile /etc/caddy/Caddyfile
43
+ COPY --from=build /app/_site /srv
44
+ LABEL dev.percher.health-client="static-http-v1"
45
+ # HOME points at the writable tmpfs so non-root Caddy can persist its
46
+ # XDG state (storage-clean lock, config autosave) under Percher's
47
+ # read-only root filesystem.
48
+ ENV HOME=/tmp
49
+ USER 10001:10001
50
+ EXPOSE 8080
51
+ CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"]
@@ -0,0 +1,14 @@
1
+ BSD Zero Clause License (0BSD)
2
+
3
+ Copyright (c) 2026 Mattias Malmborg
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted.
7
+
8
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
+ PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "__APP_NAME__",
3
+ "version": "1.0.0",
4
+ "private": true,
5
+ "scripts": {
6
+ "build": "eleventy",
7
+ "dev": "eleventy --serve"
8
+ },
9
+ "devDependencies": {
10
+ "@11ty/eleventy": "^3.0.0"
11
+ }
12
+ }
@@ -0,0 +1,11 @@
1
+ [app]
2
+ name = "__APP_NAME__"
3
+ runtime = "docker"
4
+ framework = "eleventy"
5
+
6
+ [web]
7
+ port = 8080
8
+ health = "/"
9
+
10
+ [data]
11
+ mode = "none"
@@ -0,0 +1,12 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <title>{{ title or "__APP_NAME__" }}</title>
7
+ <link rel="stylesheet" href="/assets/style.css" />
8
+ </head>
9
+ <body>
10
+ <main>{{ content | safe }}</main>
11
+ </body>
12
+ </html>
@@ -0,0 +1,12 @@
1
+ body {
2
+ font-family: system-ui, -apple-system, sans-serif;
3
+ max-width: 640px;
4
+ margin: 48px auto;
5
+ padding: 0 24px;
6
+ line-height: 1.6;
7
+ color: #222;
8
+ }
9
+ h1 {
10
+ font-weight: 600;
11
+ letter-spacing: -0.5px;
12
+ }
@@ -0,0 +1,10 @@
1
+ ---
2
+ layout: base.njk
3
+ title: __APP_NAME__
4
+ ---
5
+
6
+ # __APP_NAME__
7
+
8
+ Welcome. This is an Eleventy static site deployed on Percher.
9
+
10
+ Edit `src/index.md` and push — Percher rebuilds and serves the `_site` output.
@@ -0,0 +1,14 @@
1
+ BSD Zero Clause License (0BSD)
2
+
3
+ Copyright (c) 2026 Mattias Malmborg
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted.
7
+
8
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
+ PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,8 @@
1
+ import { Elysia } from "elysia";
2
+
3
+ const app = new Elysia()
4
+ .get("/health", () => ({ status: "ok" }))
5
+ .get("/", () => "Hello from __APP_NAME__!")
6
+ .listen(Number(process.env.PORT ?? 3000));
7
+
8
+ console.log(`__APP_NAME__ running on :${app.server?.port}`);
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "__APP_NAME__",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "start": "bun run index.ts"
8
+ },
9
+ "dependencies": {
10
+ "elysia": "^1.1.0"
11
+ }
12
+ }
@@ -0,0 +1,11 @@
1
+ [app]
2
+ name = "__APP_NAME__"
3
+ runtime = "bun"
4
+ framework = "elysia"
5
+
6
+ [web]
7
+ port = 3000
8
+ health = "/health"
9
+
10
+ [data]
11
+ mode = "none"
@@ -0,0 +1,14 @@
1
+ BSD Zero Clause License (0BSD)
2
+
3
+ Copyright (c) 2026 Mattias Malmborg
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted.
7
+
8
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
+ PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,16 @@
1
+ import express from "express";
2
+
3
+ const app = express();
4
+ const port = Number(process.env.PORT ?? 3000);
5
+
6
+ app.get("/health", (_req, res) => {
7
+ res.json({ status: "ok" });
8
+ });
9
+
10
+ app.get("/", (_req, res) => {
11
+ res.send("Hello from __APP_NAME__!");
12
+ });
13
+
14
+ app.listen(port, () => {
15
+ console.log(`Listening on http://localhost:${port}`);
16
+ });
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "__APP_NAME__",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "start": "node index.ts"
8
+ },
9
+ "dependencies": {
10
+ "express": "^5.0.0"
11
+ }
12
+ }
@@ -0,0 +1,11 @@
1
+ [app]
2
+ name = "__APP_NAME__"
3
+ runtime = "node"
4
+ framework = "express"
5
+
6
+ [web]
7
+ port = 3000
8
+ health = "/health"
9
+
10
+ [data]
11
+ mode = "none"
@@ -0,0 +1,14 @@
1
+ BSD Zero Clause License (0BSD)
2
+
3
+ Copyright (c) 2026 Mattias Malmborg
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted.
7
+
8
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
+ PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,13 @@
1
+ import Fastify from "fastify";
2
+
3
+ const app = Fastify({ logger: true });
4
+
5
+ app.get("/health", async () => ({ status: "ok" }));
6
+
7
+ app.get("/", async () => ({ hello: "__APP_NAME__" }));
8
+
9
+ const port = Number(process.env.PORT ?? 3000);
10
+ app.listen({ port, host: "0.0.0.0" }).catch((err) => {
11
+ app.log.error(err);
12
+ process.exit(1);
13
+ });
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "__APP_NAME__",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "start": "node index.ts"
8
+ },
9
+ "dependencies": {
10
+ "fastify": "^5.0.0"
11
+ }
12
+ }
@@ -0,0 +1,11 @@
1
+ [app]
2
+ name = "__APP_NAME__"
3
+ runtime = "node"
4
+ framework = "fastify"
5
+
6
+ [web]
7
+ port = 3000
8
+ health = "/health"
9
+
10
+ [data]
11
+ mode = "none"
@@ -0,0 +1,14 @@
1
+ BSD Zero Clause License (0BSD)
2
+
3
+ Copyright (c) 2026 Mattias Malmborg
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted.
7
+
8
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
+ PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,23 @@
1
+ import os
2
+ from flask import Flask, jsonify
3
+
4
+ app = Flask(__name__)
5
+
6
+
7
+ @app.route("/health")
8
+ def health():
9
+ return jsonify({"status": "ok"})
10
+
11
+
12
+ @app.route("/")
13
+ def index():
14
+ return f"Hello from __APP_NAME__!"
15
+
16
+
17
+ if __name__ == "__main__":
18
+ port = int(os.environ.get("PORT", 5000))
19
+ # 0.0.0.0 is required so Flask binds inside the Percher container and
20
+ # Caddy can route to it. Public exposure is gated by Caddy + the
21
+ # platform's egress rules, not by the bind address.
22
+ # nosemgrep: python.flask.security.audit.app-run-param-config.avoid_app_run_with_bad_host
23
+ app.run(host="0.0.0.0", port=port)
@@ -0,0 +1,12 @@
1
+ [app]
2
+ name = "__APP_NAME__"
3
+ runtime = "python"
4
+ framework = "flask"
5
+
6
+ [web]
7
+ command = "gunicorn main:app --bind 0.0.0.0:5000"
8
+ port = 5000
9
+ health = "/health"
10
+
11
+ [data]
12
+ mode = "none"
@@ -0,0 +1,2 @@
1
+ flask>=3.0.0
2
+ gunicorn>=22.0
@@ -0,0 +1,11 @@
1
+ FROM golang:1.23-alpine AS build
2
+ WORKDIR /src
3
+ COPY go.mod ./
4
+ COPY main.go ./
5
+ RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o /app .
6
+
7
+ FROM gcr.io/distroless/static-debian12:nonroot
8
+ COPY --from=build /app /app
9
+ EXPOSE 8080
10
+ USER nonroot
11
+ ENTRYPOINT ["/app"]
@@ -0,0 +1,14 @@
1
+ BSD Zero Clause License (0BSD)
2
+
3
+ Copyright (c) 2026 Mattias Malmborg
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted.
7
+
8
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
+ PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,3 @@
1
+ module __APP_NAME__
2
+
3
+ go 1.23
@@ -0,0 +1,53 @@
1
+ package main
2
+
3
+ import (
4
+ "fmt"
5
+ "log"
6
+ "net/http"
7
+ "os"
8
+ )
9
+
10
+ func main() {
11
+ port := os.Getenv("PORT")
12
+ if port == "" {
13
+ port = "8080"
14
+ }
15
+
16
+ http.HandleFunc("/health", func(w http.ResponseWriter, _ *http.Request) {
17
+ w.Header().Set("Content-Type", "application/json")
18
+ _, _ = fmt.Fprint(w, `{"ok":true}`)
19
+ })
20
+
21
+ http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
22
+ if r.URL.Path != "/" {
23
+ http.NotFound(w, r)
24
+ return
25
+ }
26
+ w.Header().Set("Content-Type", "text/html; charset=utf-8")
27
+ _, _ = fmt.Fprint(w, `<!doctype html>
28
+ <html lang="en">
29
+ <head>
30
+ <meta charset="utf-8" />
31
+ <title>__APP_NAME__</title>
32
+ <style>
33
+ body { font-family: system-ui, sans-serif; max-width: 640px; margin: 48px auto; padding: 0 24px; line-height: 1.6; }
34
+ h1 { letter-spacing: -0.5px; }
35
+ </style>
36
+ </head>
37
+ <body>
38
+ <h1>__APP_NAME__</h1>
39
+ <p>A Go app deployed on Percher.</p>
40
+ <p>Add handlers in <code>main.go</code> and push to redeploy.</p>
41
+ </body>
42
+ </html>`)
43
+ })
44
+
45
+ log.Printf("listening on :%s", port)
46
+ // Plain HTTP is correct here: Percher's Caddy ingress terminates
47
+ // TLS in front of the container. The app speaks HTTP on its
48
+ // internal port and Caddy proxies HTTPS traffic to it.
49
+ // nosemgrep: go.lang.security.audit.net.use-tls.use-tls
50
+ if err := http.ListenAndServe(":"+port, nil); err != nil {
51
+ log.Fatal(err)
52
+ }
53
+ }
@@ -0,0 +1,11 @@
1
+ [app]
2
+ name = "__APP_NAME__"
3
+ runtime = "docker"
4
+ framework = "go"
5
+
6
+ [web]
7
+ port = 8080
8
+ health = "/health"
9
+
10
+ [data]
11
+ mode = "none"
@@ -0,0 +1,14 @@
1
+ BSD Zero Clause License (0BSD)
2
+
3
+ Copyright (c) 2026 Mattias Malmborg
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted.
7
+
8
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
+ PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,14 @@
1
+ import { serve } from "@hono/node-server";
2
+ import { Hono } from "hono";
3
+
4
+ const app = new Hono();
5
+
6
+ app.get("/health", (c) => c.json({ status: "ok" }));
7
+
8
+ app.get("/", (c) => c.text("Hello from __APP_NAME__!"));
9
+
10
+ serve({
11
+ hostname: "0.0.0.0",
12
+ port: Number(process.env.PORT ?? 3000),
13
+ fetch: app.fetch,
14
+ });
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "__APP_NAME__",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "start": "node index.ts"
8
+ },
9
+ "dependencies": {
10
+ "@hono/node-server": "^1.19.17",
11
+ "hono": "^4.0.0"
12
+ }
13
+ }
@@ -0,0 +1,11 @@
1
+ [app]
2
+ name = "__APP_NAME__"
3
+ runtime = "node"
4
+ framework = "hono"
5
+
6
+ [web]
7
+ port = 3000
8
+ health = "/health"
9
+
10
+ [data]
11
+ mode = "none"
@@ -0,0 +1,14 @@
1
+ BSD Zero Clause License (0BSD)
2
+
3
+ Copyright (c) 2026 Mattias Malmborg
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted.
7
+
8
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
+ PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,32 @@
1
+ import express from "express";
2
+
3
+ const app = express();
4
+ const port = Number(process.env.PORT ?? 3000);
5
+
6
+ app.get("/health", (_req, res) => res.json({ status: "ok" }));
7
+
8
+ app.get("/", (_req, res) => {
9
+ res.type("html").send(`<!doctype html>
10
+ <html lang="en">
11
+ <head>
12
+ <meta charset="UTF-8" />
13
+ <title>__APP_NAME__</title>
14
+ <script src="https://unpkg.com/htmx.org@2.0.2"></script>
15
+ </head>
16
+ <body style="font-family: system-ui; padding: 40px;">
17
+ <h1>Hello from __APP_NAME__</h1>
18
+ <p>Express + HTMX on Percher. No build step, just server-rendered HTML fragments.</p>
19
+ <button hx-get="/click" hx-swap="outerHTML" style="font-size: 16px; padding: 10px 20px;">
20
+ Click me
21
+ </button>
22
+ </body>
23
+ </html>`);
24
+ });
25
+
26
+ app.get("/click", (_req, res) => {
27
+ res
28
+ .type("html")
29
+ .send(`<p><strong>Hello back.</strong> Swapped at ${new Date().toISOString()}.</p>`);
30
+ });
31
+
32
+ app.listen(port, () => console.log(`__APP_NAME__ listening on :${port}`));
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "__APP_NAME__",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "start": "node index.ts"
8
+ },
9
+ "dependencies": {
10
+ "express": "^4.19.0"
11
+ },
12
+ "devDependencies": {
13
+ "@types/express": "^4.17.0"
14
+ }
15
+ }
@@ -0,0 +1,11 @@
1
+ [app]
2
+ name = "__APP_NAME__"
3
+ runtime = "node"
4
+ framework = "express"
5
+
6
+ [web]
7
+ port = 3000
8
+ health = "/health"
9
+
10
+ [data]
11
+ mode = "none"
@@ -0,0 +1,6 @@
1
+ :8080 {
2
+ bind 0.0.0.0
3
+ root * /srv
4
+ encode gzip zstd
5
+ file_server
6
+ }