@@ -122,12 +122,14 @@ Response: `EngineState` from `@auralyze/engine` with all analysis results. Inclu
122122Build the API service for Railway deployment:
123123
124124``` bash
125- docker build -t auralyze-api .
125+ # Build with npm token for private @auralyze/engine package
126+ docker build --build-arg NPM_TOKEN=$NPM_TOKEN -t auralyze-api .
126127docker run -p 8080:8080 --env-file .env auralyze-api
127128```
128129
129130The Dockerfile handles:
130131
132+ - ** GitHub Packages Authentication** : Requires ` NPM_TOKEN ` build arg to install private ` @auralyze/engine ` package
131133- ** Prisma Client Generation** : Runs ` npx prisma generate ` during build
132134- ** Database Migrations** : Runs ` npm run db:deploy ` on container start
133135- ** TypeScript Compilation** : Builds to ` dist/ ` directory
@@ -136,11 +138,12 @@ The Dockerfile handles:
136138When deploying to Railway as a standalone repository:
137139
1381401 . Ensure ` Dockerfile ` exists in repo root (Railway auto-detects it)
139- 2 . Add database reference: ` DATABASE_URL=${{Postgres.DATABASE_URL}} `
140- 3 . Configure service references for internal networking:
141+ 2 . ** Set ` NPM_TOKEN ` environment variable** in Railway with your GitHub Personal Access Token (with ` read:packages ` scope)
142+ 3 . Add database reference: ` DATABASE_URL=${{Postgres.DATABASE_URL}} `
143+ 4 . Configure service references for internal networking:
141144 - ` METADATA_SERVICE_URL=https://metadata.railway.internal `
142145 - ` ANALYSIS_SERVICE_URL=https://analysis.railway.internal `
143- 4 . Generate and set API keys for service authentication
146+ 5 . Generate and set API keys for service authentication
144147
145148The Dockerfile ensures Prisma Client is generated ** before** runtime, preventing ` @prisma/client did not initialize ` errors.
146149:::
0 commit comments