create-authup 1.0.0-beta.69 → 1.0.0-beta.70
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 +93 -51
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,58 +1,100 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/authup/authup/master/.github/assets/logo.svg" alt="Authup logo" width="96" height="96" />
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
<h1 align="center">create-authup</h1>
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
one of the two.
|
|
7
|
+
<p align="center">
|
|
8
|
+
<b>Answer a few questions and get the deployment files for Authup: docker run, compose, Helm or bare metal.</b><br>
|
|
9
|
+
No hand-assembled env files, no copied compose snippets, no guessing which keys a release understands.
|
|
10
|
+
</p>
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
<p align="center">
|
|
13
|
+
<a href="https://www.npmjs.com/package/create-authup"><img src="https://img.shields.io/npm/v/create-authup" alt="npm version" /></a>
|
|
14
|
+
<a href="https://github.com/authup/authup/actions/workflows/main.yml"><img src="https://github.com/authup/authup/actions/workflows/main.yml/badge.svg" alt="CI" /></a>
|
|
15
|
+
<a href="./LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-blue" alt="License: Apache-2.0" /></a>
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
<p align="center">
|
|
19
|
+
<a href="#installation"><b>Installation</b></a> · <a href="#usage">Usage</a> · <a href="#targets">Targets</a> · <a href="https://authup.org/guide/deployment/">Documentation</a>
|
|
20
|
+
</p>
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Why create-authup?
|
|
25
|
+
|
|
26
|
+
A first Authup deployment means picking the right environment variables for the image, wiring a database, deciding on Redis, and getting the details right that only show up later: a public URL that is also the OpenID Connect issuer, a proxy hop count so client addresses cannot be spoofed, secrets that should not be world-readable. The wizard asks for the decisions and writes the files.
|
|
27
|
+
|
|
28
|
+
| Concern | Without it | With create-authup |
|
|
29
|
+
|---|---|---|
|
|
30
|
+
| **Configuration keys** | Copied from docs that may describe another release | Its test suite checks every key it writes against the configuration schema and the environment variables of its own release |
|
|
31
|
+
| **Versions** | `latest`, or a tag you look up | The image tag and the `authup` dependency are pinned exactly to the wizard's own version |
|
|
32
|
+
| **Proxy trust** | Authup's default trusts every `X-Forwarded-For` hop | `TRUST_PROXY` (`core.trustProxy` on bare metal) is written as the number of proxies the deployment has, or `false`; the Helm values leave it to the chart |
|
|
33
|
+
| **Secrets** | An env file with the default `0644` mode | Files holding a password are written `0600`, also when overwritten |
|
|
34
|
+
| **Scale-out** | A split topology you assemble by hand | Worker and console services as their own containers, with Redis turned on and, for compose, an nginx in front |
|
|
35
|
+
|
|
36
|
+
## Installation
|
|
37
|
+
|
|
38
|
+
Nothing to install; run it with npm:
|
|
39
|
+
|
|
40
|
+
```shell
|
|
41
|
+
npm create authup@latest
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
This runs the `create-authup` binary in the current directory. Use `@latest` to scaffold the current release, since the version you run is the version the files pin. The wizard needs Node.js `^22.13.0 || ^23.5.0 || >=24.0.0` and has no runtime dependencies.
|
|
45
|
+
|
|
46
|
+
## Usage
|
|
47
|
+
|
|
48
|
+
```shell
|
|
49
|
+
npm create authup@latest
|
|
50
|
+
npm create authup@latest -- --force
|
|
51
|
+
npx create-authup --help
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
| Flag | Description |
|
|
55
|
+
|---|---|
|
|
56
|
+
| `--force` | Overwrite files that already exist. Without it the wizard lists the conflicts, writes nothing and exits with 1 |
|
|
57
|
+
| `--help` | Print the usage |
|
|
58
|
+
|
|
59
|
+
Any other flag or a positional argument is refused. A file name that exists as a directory is never written over, `--force` or not.
|
|
60
|
+
|
|
61
|
+
### Questions
|
|
62
|
+
|
|
63
|
+
Asked in this order, with the default in brackets; some are only asked when they apply:
|
|
64
|
+
|
|
65
|
+
1. **Deployment target**: `docker`, `compose`, `helm` or `bare-metal` [`compose`], by name or number.
|
|
66
|
+
2. **Public URL**: the address a browser reaches Authup at, which is the OpenID Connect issuer and the base of every console URL. No credentials, query or fragment; for `helm` no path either.
|
|
67
|
+
3. **cert-manager** (`helm` over https only): request the ingress certificate from cert-manager instead of expecting a `<hostname>-tls` secret [no].
|
|
68
|
+
4. **Database**: `postgres` or `mysql`, plus `sqlite` for `bare-metal` [`postgres`]. For `compose` and `helm` it asks whether to run the database alongside Authup [yes]; then only a password is asked. Otherwise: host (`127.0.0.1` on bare metal), port (5432 or 3306), username [`authup`], password and database name [`authup`].
|
|
69
|
+
5. **User registration** [no] and **password recovery** [no]. When either is on, the SMTP connection URL (`smtp://` or `smtps://`); with registration on, whether to verify email addresses [yes].
|
|
70
|
+
6. **Admin password**: required, 3 to 256 characters, and never `start123`, the provisioning default.
|
|
71
|
+
7. **Worker and consoles as separate services** (`compose` and `helm` only) [no, no].
|
|
72
|
+
8. **Redis** [no]: asked only when nothing is split, since a split turns it on. `compose` and `helm` use the bundled `redis://redis:6379`; `docker` and `bare-metal` ask for the URL.
|
|
73
|
+
|
|
74
|
+
Passwords are not echoed on a terminal. A value is refused when it holds a single quote together with a literal `\n` or `\r` sequence, because such a value has no `.env` representation that reads back unchanged.
|
|
75
|
+
|
|
76
|
+
## Targets
|
|
77
|
+
|
|
78
|
+
| Target | Files | Next steps the wizard prints |
|
|
12
79
|
|---|---|---|
|
|
13
80
|
| `docker` | `authup.env` | `docker run -d --name authup --restart unless-stopped --env-file authup.env -p <port>:3000 authup/authup:<version> start` |
|
|
14
|
-
| `compose` | `docker-compose.yml`, `.env
|
|
15
|
-
| `helm` | `values.yaml` | `helm repo add authup https://helm.authup.org`,
|
|
81
|
+
| `compose` | `docker-compose.yml`, `.env`, and `nginx.conf` with a console split | `docker compose up -d`, preceded by `docker compose run --rm authup migration run` with a worker split |
|
|
82
|
+
| `helm` | `values.yaml` | `helm repo add authup https://helm.authup.org`, `helm install authup authup/authup -f values.yaml` |
|
|
16
83
|
| `bare-metal` | `package.json`, `authup.yml`, `.env` | `npm install`, `npx authup config validate`, `npm start` |
|
|
17
84
|
|
|
18
|
-
The
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
worker and the
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
proxies the deployment knows about, or `false` when nothing is in front, since
|
|
35
|
-
authup's own default trusts every `X-Forwarded-For` hop. Every emitted file
|
|
36
|
-
carries commented placeholders for `TRUSTED_ORIGINS`, `SECRETS_ENCRYPTION_KEY`
|
|
37
|
-
and the configuration file mount, so the options a real deployment reaches for
|
|
38
|
-
next are one uncomment away.
|
|
39
|
-
|
|
40
|
-
Two flags: `--force` overwrites files that already exist (without it the
|
|
41
|
-
conflicts are listed, nothing is written and the process exits 1), `--help`
|
|
42
|
-
prints the usage.
|
|
43
|
-
|
|
44
|
-
Versions are pinned to the wizard's own version: the image tag and the
|
|
45
|
-
`authup` dependency are both exactly `pkg.version`, never `latest` and never a
|
|
46
|
-
range, so run `npm create authup@latest` to scaffold the current release. Helm
|
|
47
|
-
is the exception and names no tag at all: the chart's `appVersion` owns the
|
|
48
|
-
image, so the chart version is what selects the release there. An emitted
|
|
49
|
-
`authup.yml` is checked with `npx authup config validate`, and the emitted helm
|
|
50
|
-
values are validated in this package's test suite against the chart's own
|
|
51
|
-
`values.schema.json`, vendored under `test/fixtures/`.
|
|
52
|
-
|
|
53
|
-
The package holds zero runtime dependencies: prompts ride
|
|
54
|
-
`node:readline/promises`, flags `node:util.parseArgs`, and every emitted
|
|
55
|
-
document is a plain string template. It never runs a service.
|
|
56
|
-
|
|
57
|
-
The deployment guides describe each target in full:
|
|
58
|
-
https://authup.org/guide/deployment/
|
|
85
|
+
- **The port follows the public URL.** An explicit http port (`http://host:8080`) is dialed directly, so it is the port published or listened on. https or a default port means a reverse proxy owns the port, and Authup listens on 3000.
|
|
86
|
+
- **Every file carries commented placeholders** for `TRUSTED_ORIGINS`, `SECRETS_ENCRYPTION_KEY` and the configuration file mount.
|
|
87
|
+
- **`bare-metal` writes a `package.json`** named `authup-deployment` with `"start": "authup start"` and the `authup` dependency pinned to the wizard's version; the structure goes into `authup.yml` and the secrets into `.env`.
|
|
88
|
+
|
|
89
|
+
## Notes
|
|
90
|
+
|
|
91
|
+
- **The `docker` target refuses SQLite.** The image runs in production mode, which refuses the SQLite driver, so the database must exist already; only `bare-metal` offers SQLite.
|
|
92
|
+
- **The Helm values name no image tag.** The chart's version decides the release there, and the file states the chart version it needs (0.4.0 or later).
|
|
93
|
+
- **A split needs Redis.** With a worker or console split the console sign-in and the token blocklist cross replicas through the cache, so Redis is added and the wizard says so.
|
|
94
|
+
- **It only writes files.** Nothing is started; every file it writes runs the `authup` CLI or the `authup/authup` image.
|
|
95
|
+
|
|
96
|
+
## License
|
|
97
|
+
|
|
98
|
+
Made with 💚
|
|
99
|
+
|
|
100
|
+
Published under the [Apache 2.0 License](./LICENSE).
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-authup",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
5
|
-
"description": "
|
|
4
|
+
"version": "1.0.0-beta.70",
|
|
5
|
+
"description": "Answer a few questions and get the deployment files for Authup: docker run, compose, Helm or bare metal.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"bin": {
|
|
8
8
|
"create-authup": "dist/index.mjs"
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
"homepage": "https://github.com/authup/authup#readme",
|
|
48
48
|
"dependencies": {},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@authup/server-config": "^1.0.0-beta.
|
|
51
|
-
"@authup/server-config-kit": "^1.0.0-beta.
|
|
50
|
+
"@authup/server-config": "^1.0.0-beta.70",
|
|
51
|
+
"@authup/server-config-kit": "^1.0.0-beta.70",
|
|
52
52
|
"@types/node": "^26.6.5",
|
|
53
53
|
"ajv": "^8.20.0",
|
|
54
54
|
"cross-env": "^10.1.0",
|
|
55
|
-
"dotenv": "^18.0.
|
|
55
|
+
"dotenv": "^18.0.8",
|
|
56
56
|
"vitest": "^5.0.3",
|
|
57
57
|
"yaml": "^2.9.1"
|
|
58
58
|
},
|