Add detailed deployment workflow:
- Version bump before deploy
- Trigger publish.yml with ref=main, stack_env=stg, tag=<version>
- Wait for publish to complete
- Trigger re-pull.yml with ref=main, stack_name=desa-darmasaba, stack_env=stg
- Include GitHub CLI commands for reference
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Detect failed migrations in _prisma_migrations table
- Auto resolve with 'prisma migrate resolve --rolled-back'
- Fallback to 'prisma db push' if resolve fails
- Ensures staging/prod can deploy even with migration history issues
Fixes P3009 error on staging where 20260406032433_init migration failed
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>