fix: update Dockerfile for security and fix README command references

- Add non-root USER directive to Dockerfile
- Copy pnpm-lock.yaml before install
- Update README checklist with current CLI commands
This commit is contained in:
ZTatman 2026-04-13 13:14:56 -04:00
parent 90363e59cd
commit fb7ffaf248
3 changed files with 24 additions and 22 deletions

View file

@ -2,7 +2,7 @@ FROM node:22-alpine
WORKDIR /app
COPY package*.json ./
COPY package*.json pnpm-lock.yaml pnpm-workspace.yaml ./
COPY packages/service/package*.json ./packages/service/
COPY packages/shared/package*.json ./packages/shared/
COPY tsconfig.base.json ./
@ -19,4 +19,6 @@ ENV PORT=3000
EXPOSE 3000
USER node
CMD ["pnpm", "--filter", "@myst/service", "start"]

View file

@ -95,9 +95,9 @@ GRANT_TOKEN_SECRET="your-secret-here"
- [x] CLI scaffold (`myst config init`)
- [x] Config generation (`.env`)
- [ ] Service foundation (FastAPI + PostgreSQL)
- [ ] `myst verify` — verify Forgejo connectivity
- [ ] `myst verify --diagnostic` — validate configuration
- [ ] `myst config view` — show current config
- [x] `myst config verify` — verify Forgejo connectivity
- [x] `myst config verify --diagnostic` — comprehensive diagnostics
- [x] `myst config view` — show current config
- [ ] Forgejo session authentication
- [ ] Repo ownership verification
- [ ] Private link creation (email-verified)

View file

@ -21,24 +21,6 @@ interface CheckResult {
message?: string;
}
async function verifyCommand(opts: VerifyOptions): Promise<void> {
const isDiagnostic = opts.diagnostic ?? false;
p.intro(c.bold("myst config verify"));
const config = loadConfig();
if (!config) {
return;
}
const missing = getMissingKeys(config);
if (isDiagnostic) {
await runDiagnosticMode(config, missing);
} else {
await runVerifyMode(config, missing);
}
}
function loadConfig(): Record<string, string> | null {
const envPath = path.join(process.cwd(), ".env");
@ -192,6 +174,24 @@ async function runForgejoChecks(
return results;
}
async function verifyCommand(opts: VerifyOptions): Promise<void> {
const isDiagnostic = opts.diagnostic ?? false;
p.intro(c.bold("myst verify"));
const config = loadConfig();
if (!config) {
return;
}
const missing = getMissingKeys(config);
if (isDiagnostic) {
await runDiagnosticMode(config, missing);
} else {
await runVerifyMode(config, missing);
}
}
export const commandConfig: CommandConfig = {
description: "Verify Myst configuration and connection to Forgejo",
options: {