landfall 0.6.3 → 0.6.5
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/README.md +4 -2
- package/dist/cli.mjs +215 -167
- package/dist/index.html +96 -16
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -144,6 +144,7 @@ No domain yet? Leave out `-d`. landfall offers `<name>.<ip-with-dashes>.sslip.io
|
|
|
144
144
|
|---|---|---|
|
|
145
145
|
| **compose** | the folder has a `compose.yaml` | Uploads the folder and runs it as one Compose project. See [Compose sites](#compose-sites). |
|
|
146
146
|
| **static** | no compose file, no Dockerfile | Uploads the folder and serves it with `nginx:alpine` (gzip, long cache headers for assets). The folder is where the site generator builds to, even before the first build (Vite/Astro `dist/` or its `outDir`, SvelteKit/CRA/Docusaurus `build/`, Next `out/`, Gatsby/Hugo `public/`, Eleventy/Jekyll `_site/`, Nuxt `.output/public/`, Angular, MkDocs `site/`), else `.` if it has an `index.html`, else the first of `dist/ build/ out/ public/ _site/ site/` with one. `lf deploy <dir>` picks another. `--spa` sends unknown paths to `index.html`. |
|
|
147
|
+
| **node** | a server-rendering framework, no `Dockerfile` | Next.js, Nuxt (`nuxt build`), TanStack Start, SolidStart, SvelteKit with `adapter-node`, Astro with `@astrojs/node`, React Router / Remix, Angular SSR, or a `start` script with Express, Fastify, Hono, Koa, NestJS…: landfall writes a Dockerfile (Node from `.nvmrc`, the lockfile's package manager, install, build, start) and builds it on the server, so native modules match Linux. The app gets `PORT` (`--port`, default 3000) and `HOST=0.0.0.0`. `--start 'node server.js'` makes any folder one, `--build` changes the build (`''` for none), `--static` publishes static files instead; all saved to `.landfall.json`. `lf init` writes the Dockerfile into the project to change it. |
|
|
147
148
|
| **dockerfile** | the folder has a `Dockerfile` | Uploads the folder and builds it on the server. The port comes from `EXPOSE`, else `--port` (default 3000). `--static` forces static. |
|
|
148
149
|
| **image** | `--image ghcr.io/me/app:1.2` | Pulls the image and runs it. Needs `--port`. For private registries: `lf ssh vps -- docker login ghcr.io`. |
|
|
149
150
|
|
|
@@ -151,6 +152,7 @@ No domain yet? Leave out `-d`. landfall offers `<name>.<ip-with-dashes>.sslip.io
|
|
|
151
152
|
cd my-site
|
|
152
153
|
lf deploy -d example.com -d www.example.com -s vps # static, name = folder name (-n to override)
|
|
153
154
|
lf deploy -b "npm run build" # build locally first
|
|
155
|
+
lf deploy --start "node server.js" --port 8080 # a Node.js app: landfall writes its Dockerfile
|
|
154
156
|
lf deploy -d app.example.com -e DATABASE_URL=postgres://… --env-file .env.production # Dockerfile app
|
|
155
157
|
lf deploy -n api --image ghcr.io/me/api:1.4 --port 8080 -d api.example.com # image
|
|
156
158
|
lf deploy --no-domain # no domain yet: reach it with lf tunnel, add one later with lf domains --add
|
|
@@ -531,7 +533,7 @@ lf keys add --generate -u anna # new pair at ~/.ssh/<server>_anna, its public
|
|
|
531
533
|
|
|
532
534
|
`lf setup` and `lf server add` end with the same advice, and the web UI shows it on the system tab with a
|
|
533
535
|
button per fix. Each fix is journaled, so `lf undo` takes it back. Automatic updates know apt
|
|
534
|
-
(unattended-upgrades)
|
|
536
|
+
(unattended-upgrades), dnf (dnf-automatic) and apk (a daily `apk upgrade` from cron). Without root or sudo landfall only checks sshd's settings.
|
|
535
537
|
|
|
536
538
|
## Web UI
|
|
537
539
|
|
|
@@ -653,7 +655,7 @@ lf undo -s box -y # revert the last run
|
|
|
653
655
|
| command | what it does |
|
|
654
656
|
|---|---|
|
|
655
657
|
| `lf init [dir] [--postgres] [--port n]` | Writes `compose.yaml` and `compose.override.yaml` for the project, to run it locally and deploy it. |
|
|
656
|
-
| `lf deploy [dir] [-d domain...] [-n name] [-f file] [-b cmd] [--spa] [--image img] [--port n] [-e K=V] [--env-file f] [--static] [--keep n] [--host ip [-u user] [--ssh-port p] [--password-stdin]]` | Deploys a Compose project, static folder, Dockerfile app or image. Sets up a server that isn't yet. |
|
|
658
|
+
| `lf deploy [dir] [-d domain...] [-n name] [-f file] [-b cmd] [--start cmd] [--spa] [--image img] [--port n] [-e K=V] [--env-file f] [--static] [--keep n] [--host ip [-u user] [--ssh-port p] [--password-stdin]]` | Deploys a Compose project, Node.js app, static folder, Dockerfile app or image. Sets up a server that isn't yet. |
|
|
657
659
|
| `lf ls [--json] [--others]` | Lists sites on the server with their status, plus containers Traefik routes that landfall did not deploy (read only; `--json --others` gives `{sites, others}`). Alias: `sites list`. |
|
|
658
660
|
| `lf sites info [name]` | Shows services, domains and release history. |
|
|
659
661
|
| `lf domains [name] [--add d] [--rm d] [--set d] [--json]` | Lists domains with their DNS and HTTPS state, or changes them. Removing the last one leaves the site unrouted. |
|