mirror of
https://github.com/ZTatman/myst.git
synced 2026-11-22 12:57:58 +00:00
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:
parent
90363e59cd
commit
fb7ffaf248
3 changed files with 24 additions and 22 deletions
|
|
@ -2,7 +2,7 @@ FROM node:22-alpine
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY package*.json ./
|
COPY package*.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
||||||
COPY packages/service/package*.json ./packages/service/
|
COPY packages/service/package*.json ./packages/service/
|
||||||
COPY packages/shared/package*.json ./packages/shared/
|
COPY packages/shared/package*.json ./packages/shared/
|
||||||
COPY tsconfig.base.json ./
|
COPY tsconfig.base.json ./
|
||||||
|
|
@ -19,4 +19,6 @@ ENV PORT=3000
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
|
USER node
|
||||||
|
|
||||||
CMD ["pnpm", "--filter", "@myst/service", "start"]
|
CMD ["pnpm", "--filter", "@myst/service", "start"]
|
||||||
|
|
|
||||||
|
|
@ -95,9 +95,9 @@ GRANT_TOKEN_SECRET="your-secret-here"
|
||||||
- [x] CLI scaffold (`myst config init`)
|
- [x] CLI scaffold (`myst config init`)
|
||||||
- [x] Config generation (`.env`)
|
- [x] Config generation (`.env`)
|
||||||
- [ ] Service foundation (FastAPI + PostgreSQL)
|
- [ ] Service foundation (FastAPI + PostgreSQL)
|
||||||
- [ ] `myst verify` — verify Forgejo connectivity
|
- [x] `myst config verify` — verify Forgejo connectivity
|
||||||
- [ ] `myst verify --diagnostic` — validate configuration
|
- [x] `myst config verify --diagnostic` — comprehensive diagnostics
|
||||||
- [ ] `myst config view` — show current config
|
- [x] `myst config view` — show current config
|
||||||
- [ ] Forgejo session authentication
|
- [ ] Forgejo session authentication
|
||||||
- [ ] Repo ownership verification
|
- [ ] Repo ownership verification
|
||||||
- [ ] Private link creation (email-verified)
|
- [ ] Private link creation (email-verified)
|
||||||
|
|
|
||||||
|
|
@ -21,24 +21,6 @@ interface CheckResult {
|
||||||
message?: string;
|
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 {
|
function loadConfig(): Record<string, string> | null {
|
||||||
const envPath = path.join(process.cwd(), ".env");
|
const envPath = path.join(process.cwd(), ".env");
|
||||||
|
|
||||||
|
|
@ -192,6 +174,24 @@ async function runForgejoChecks(
|
||||||
return results;
|
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 = {
|
export const commandConfig: CommandConfig = {
|
||||||
description: "Verify Myst configuration and connection to Forgejo",
|
description: "Verify Myst configuration and connection to Forgejo",
|
||||||
options: {
|
options: {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue