percher 0.5.9 → 0.5.11
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.
- package/dist/bin/percher.js +989 -812
- package/dist/package.json +2 -2
- package/dist/src/commands/account.d.ts.map +1 -1
- package/dist/src/commands/account.js +11 -1
- package/dist/src/commands/account.js.map +1 -1
- package/dist/templates/astro/Dockerfile +35 -34
- package/dist/templates/astro/src/pages/index.astro +1 -1
- package/dist/templates/eleventy/Dockerfile +35 -34
- package/dist/templates/hugo/Dockerfile +33 -32
- package/dist/templates/laravel/Dockerfile +5 -1
- package/dist/templates/nextjs/next.config.mjs +8 -0
- package/dist/templates/nextjs/package.json +6 -0
- package/dist/templates/preact/Dockerfile +35 -34
- package/dist/templates/python/nixpacks.toml +8 -0
- package/dist/templates/python/percher.toml +1 -0
- package/dist/templates/rust/Dockerfile +5 -1
- package/dist/templates/solid/Dockerfile +35 -34
- package/dist/templates/vite-react/Dockerfile +35 -34
- package/dist/templates/vite-vue/Dockerfile +35 -34
- package/package.json +2 -2
- package/dist/templates/nextjs/next.config.ts +0 -5
- package/dist/templates/node/index.ts +0 -12
|
@@ -1,34 +1,35 @@
|
|
|
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
|
-
# caddy:2-alpine ships /usr/bin/caddy with cap_net_bind_service file
|
|
15
|
-
# caps. Percher runs every container with --security-opt
|
|
16
|
-
# no-new-privileges, which makes execve refuse a cap-bearing binary
|
|
17
|
-
# (an "operation not permitted" crash-loop). Copy Caddy onto a plain
|
|
18
|
-
# alpine base and strip the caps with setcap -r — Caddy never needs
|
|
19
|
-
# the cap here, it listens on :8080 (>= 1024).
|
|
20
|
-
FROM caddy:2-alpine AS caddy-source
|
|
21
|
-
FROM alpine:3.21
|
|
22
|
-
COPY --from=caddy-source /usr/bin/caddy /usr/bin/caddy
|
|
23
|
-
RUN apk add --no-cache libcap \
|
|
24
|
-
&& setcap -r /usr/bin/caddy \
|
|
25
|
-
&&
|
|
26
|
-
&&
|
|
27
|
-
|
|
28
|
-
COPY
|
|
29
|
-
|
|
30
|
-
#
|
|
31
|
-
#
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
+
# caddy:2-alpine ships /usr/bin/caddy with cap_net_bind_service file
|
|
15
|
+
# caps. Percher runs every container with --security-opt
|
|
16
|
+
# no-new-privileges, which makes execve refuse a cap-bearing binary
|
|
17
|
+
# (an "operation not permitted" crash-loop). Copy Caddy onto a plain
|
|
18
|
+
# alpine base and strip the caps with setcap -r — Caddy never needs
|
|
19
|
+
# the cap here, it listens on :8080 (>= 1024).
|
|
20
|
+
FROM caddy:2-alpine AS caddy-source
|
|
21
|
+
FROM alpine:3.21
|
|
22
|
+
COPY --from=caddy-source /usr/bin/caddy /usr/bin/caddy
|
|
23
|
+
RUN apk add --no-cache libcap \
|
|
24
|
+
&& (setcap -r /usr/bin/caddy 2>/dev/null || true) \
|
|
25
|
+
&& test -z "$(getcap /usr/bin/caddy)" \
|
|
26
|
+
&& apk del libcap \
|
|
27
|
+
&& rm -rf /var/cache/apk/*
|
|
28
|
+
COPY Caddyfile /etc/caddy/Caddyfile
|
|
29
|
+
COPY --from=build /app/dist /srv
|
|
30
|
+
# HOME points at the writable tmpfs so non-root Caddy can persist its
|
|
31
|
+
# XDG state (storage-clean lock, config autosave) under Percher's
|
|
32
|
+
# read-only root filesystem.
|
|
33
|
+
ENV HOME=/tmp
|
|
34
|
+
EXPOSE 8080
|
|
35
|
+
CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"]
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "percher",
|
|
3
|
-
"version": "0.5.
|
|
4
|
-
"description": "CLI for the Percher hosting platform
|
|
3
|
+
"version": "0.5.11",
|
|
4
|
+
"description": "CLI for the Percher hosting platform \u2014 publish apps with one command",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"percher": "./dist/bin/percher.js"
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
const server = Bun.serve({
|
|
2
|
-
port: Number(process.env.PORT ?? 3000),
|
|
3
|
-
fetch(req) {
|
|
4
|
-
const url = new URL(req.url);
|
|
5
|
-
if (url.pathname === "/health") {
|
|
6
|
-
return Response.json({ status: "ok" });
|
|
7
|
-
}
|
|
8
|
-
return new Response("Hello from __APP_NAME__!");
|
|
9
|
-
},
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
console.log(`Listening on http://localhost:${server.port}`);
|