feat: add durable asset synchronization worker
This commit is contained in:
+4
-3
@@ -37,7 +37,7 @@ bun run secrets:status
|
||||
bun run secrets:run -- bun scripts/check-live-config.ts
|
||||
```
|
||||
|
||||
Expected application keys: `EVE_CLIENT_ID`, optional `EVE_CLIENT_SECRET` for confidential SSO, `TYPESAFE_API_KEY`, `TOKEN_ENCRYPTION_KEY`, `CONVEX_BRIDGE_SECRET`, `APP_AUTH_PRIVATE_KEY`, and `APP_AUTH_JWKS`. Generate the last four **once** using `bun run keys:generate`; import `.env.keys` into the selected Infisical environment without replacing existing API keys. The generator refuses to overwrite an existing file. After verifying the import and key pairing, remove the temporary copy. Back up the vault: changing/loss of the encryption key makes stored EVE credentials unreadable. Do not regenerate keys casually during deployment.
|
||||
Expected application keys: `EVE_CLIENT_ID`, optional `EVE_CLIENT_SECRET` for confidential SSO, `TYPESAFE_API_KEY`, `TOKEN_ENCRYPTION_KEY`, `CONVEX_BRIDGE_SECRET`, `CONVEX_SYNC_WORKER_SECRET`, `APP_AUTH_PRIVATE_KEY`, and `APP_AUTH_JWKS`. Generate the key material **once** using `bun run keys:generate`; import `.env.keys` into the selected Infisical environment without replacing existing API keys. Configure both distinct bridge secrets in Convex with `bun run secrets:run --deployment --configure -- bun run convex:configure`; the sync worker receives only `CONVEX_SYNC_WORKER_SECRET`, while web receives only `CONVEX_BRIDGE_SECRET`. Use `bun run secrets:run --worker -- ...` for worker commands so session/JEV signing and general bridge secrets are not injected. The generator refuses to overwrite an existing file. After verifying the import and key pairing, remove the temporary copy. Back up the vault: changing/loss of the encryption key makes stored EVE credentials unreadable. Do not regenerate keys casually during deployment.
|
||||
|
||||
The helper is an operator launcher, not a sandbox. Commands it launches can read injected secrets: never run `env`, `printenv`, shell tracing, or unrestricted `docker compose config` through it. Use `docker compose config --quiet` for validation. Docker administrators can inspect container environments; Infisical startup injection does not conceal secrets from host administrators. Updating a vault value requires recreating the affected container with fresh injected values. Encryption/signing-key rotation needs a separate migration plan.
|
||||
|
||||
@@ -47,7 +47,7 @@ Run from the repository root:
|
||||
|
||||
```sh
|
||||
bun run secrets:run -- docker compose up -d backend
|
||||
bun run secrets:run --deployment -- bun run convex:configure
|
||||
bun run secrets:run --deployment --configure -- bun run convex:configure
|
||||
bun run secrets:run --deployment -- bun node_modules/convex/bin/main.js dev --once --typecheck disable
|
||||
```
|
||||
|
||||
@@ -61,9 +61,10 @@ Use the production import procedure in [reference operations](reference-operatio
|
||||
|
||||
```sh
|
||||
bun run secrets:run -- docker compose up -d --build web
|
||||
bun run secrets:run --worker -- docker compose --profile worker up -d --build sync-worker
|
||||
```
|
||||
|
||||
The container listens on 3000 internally but publishes **5173** on the host. This is the production SvelteKit/Bun server, not the Vite development server. The web mounts reference data read-only. The one-shot reference worker has the writable volume mount.
|
||||
The web container listens on 3000 internally but publishes **5173** on the host. This is the production SvelteKit/Bun server, not the Vite development server. The web mounts reference data read-only. The dedicated sync-worker is a separate long-running service: its image starts the bundled `build/sync-worker.js` through the restricted launcher and receives only worker-safe secrets. The one-shot reference worker has the writable volume mount.
|
||||
|
||||
## First live verification
|
||||
|
||||
|
||||
Reference in New Issue
Block a user