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.
@@ -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
- && apk del libcap \
26
- && rm -rf /var/cache/apk/*
27
- COPY Caddyfile /etc/caddy/Caddyfile
28
- COPY --from=build /app/dist /srv
29
- # HOME points at the writable tmpfs so non-root Caddy can persist its
30
- # XDG state (storage-clean lock, config autosave) under Percher's
31
- # read-only root filesystem.
32
- ENV HOME=/tmp
33
- EXPOSE 8080
34
- CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"]
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.9",
4
- "description": "CLI for the Percher hosting platform — publish apps with one command",
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,5 +0,0 @@
1
- import type { NextConfig } from "next";
2
-
3
- const nextConfig: NextConfig = {};
4
-
5
- export default nextConfig;
@@ -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}`);