Instead of full src/, copy only prisma/, src/lib/, src/_seeder_list/
and tsconfig.json for seed script support. Reduces image size.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Seed script uses @/* path aliases which require tsconfig.json.
Without it, 'bunx prisma db seed' fails with 'no such file or directory'.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Store relative paths in database instead of absolute paths
- Reconstruct absolute paths at runtime using UPLOAD_DIR env var
- Add VOLUME for /app/uploads in Dockerfile for persistent storage
- Create uploads directory with proper permissions in Docker
- Add error handling for missing UPLOAD_DIR in findUniq.ts
- Simplify GitHub workflow memory in QWEN.md (manual handling)
This fixes the 500 errors on staging for file create/delete operations
caused by environment-specific absolute paths stored in database.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Create docker-entrypoint.sh to run prisma migrate deploy before app start
- Update Dockerfile to use entrypoint script
- Ensures database schema is always up-to-date after deployment
- Fixes: CRUD kependudukan error 500 di staging karena tabel belum dibuat
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Create docker-entrypoint.sh to run prisma migrate deploy before app start
- Update Dockerfile to use entrypoint script
- Ensures database schema is always up-to-date after deployment
- Fixes: CRUD kependudukan error 500 di staging karena tabel belum dibuat
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add blank line before COPY for readability
- Add PORT and HOSTNAME env vars in runner stage
- Use --chown flag instead of separate chown RUN layer
- Copy only src/prisma instead of entire src directory
- Use glob pattern for next.config.* files
- Move PORT and HOSTNAME before EXPOSE
- Add newline at end of file
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Remove .env file from git tracking (was accidentally committed)
- Simplify .gitignore to use .env* pattern instead of multiple specific patterns
- Update Dockerfile for optimized multi-stage build
- Add gen:api script placeholder to package.json
Security: Ensure sensitive environment variables are not exposed in repository
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Added .dockerignore to prevent build poisoning from local artifacts.
- Updated Dockerfile with stable Bun version, memory limits, and missing config files.
- Refined prisma.ts signal handlers to avoid process termination during Next.js build phases.
- Synchronized eslint-config-next with Next.js version.
- Remove output: standalone to keep migration/seed workflow
- Restore original Dockerfile structure with full node_modules copy
- Keep serverExternalPackages for @elysiajs/static and elysia to fix
the Html prerender error caused by dynamic import in @elysiajs/static
- Keep NODE_ENV=production before build step
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add serverExternalPackages for @elysiajs/static and elysia to prevent
webpack from bundling dynamic imports that cause Html prerender error
- Use output: standalone for proper Docker deployment
- Comment out NODE_ENV=development in .env.example to avoid conflict
with next build which requires NODE_ENV=production
- Set NODE_ENV=production before build step in Dockerfile
- Update runtime stage to use standalone output structure
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove bun run gen:api which does not exist in package.json
- Change dist to .next for correct Next.js build output
- Replace non-existent generated/ with public/ for static assets
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>