Commit Graph

23 Commits

Author SHA1 Message Date
ZhenYi
603e14e53b fix: frontend built from repo root, dist/ copied into nginx image
vite.config.ts, package.json, and src/ are at the repo root.
pnpm build outputs to dist/ at the root. COPY dist/ not apps/frontend/dist/.
2026-04-15 13:17:07 +08:00
ZhenYi
65a34a627f refactor: build frontend externally, copy dist into nginx image
- frontend.Dockerfile: runtime-only, COPY apps/frontend/dist instead of building in Docker
- build.js: add frontend build step (pnpm build) before docker build
- drone.yml: remove obsolete frontend-deps/frontend-build steps
2026-04-15 13:00:34 +08:00
ZhenYi
3bc381da45 feat: add SMTP env vars to app deployment 2026-04-15 11:51:29 +08:00
ZhenYi
b3b74a2396 fix: remove trigger function from message search migration
The PL/pgSQL trigger function caused SQL parsing issues with
split_sql_statements. Keep only the table, column, and index.
2026-04-15 11:39:39 +08:00
ZhenYi
8e7f3b211e fix: use dollar-quoting for PL/pgSQL trigger function
The previous single-quote syntax with escaped quotes was split by
split_sql_statements on semicolons inside the function body.
Use $$ quoting to avoid quote escaping issues.
2026-04-15 11:31:40 +08:00
ZhenYi
b6697258ab fix(migrate): reorder migrations so workspace ALTER runs after project CREATE
m20260411_000003_add_workspace_id_to_project was running before
m20250628_000013_create_project, causing "relation project does not exist".
Move all project table CREATEs before workspace migrations.
2026-04-15 11:19:01 +08:00
ZhenYi
3a8b8c9cf8 remove all foreign key constraints from SQL migrations
Foreign keys at the database level cause issues with deployment flexibility.
Keep only indexes for query performance; enforce referential integrity at
the application level.
2026-04-15 11:03:17 +08:00
ZhenYi
2f31e7268b feat: add imagePullSecrets support to all deployment templates 2026-04-15 10:59:15 +08:00
ZhenYi
33c5501fc9 fix: remove resources from deployment templates to fix K8s schema validation 2026-04-15 10:56:22 +08:00
ZhenYi
53c63dad19 fix: simplify static deployment template, fix YAML parse error 2026-04-15 10:47:25 +08:00
ZhenYi
9112cb2dff fix: use scratch variable for port binding in static template 2026-04-15 10:42:53 +08:00
ZhenYi
9776c923c0 fix: use %v instead of %s+print for port in static template 2026-04-15 10:40:02 +08:00
ZhenYi
0ebbc6e29e fix: remove limits from resources to fix K8s schema validation
The cluster's API server rejects the limits field in Deployment containers.
Keep only requests (CPU/memory) for now.
2026-04-15 10:38:47 +08:00
ZhenYi
650243510c refactor: remove namespace and configmap from Helm chart
Namespace and ConfigMap are managed manually (not by Helm).
2026-04-15 10:30:02 +08:00
ZhenYi
fd724ca4ae chore: use timestamp as default image tag (YYYY-MM-DD-HH) 2026-04-15 10:16:13 +08:00
ZhenYi
852dec099d remove migrate service
Migrations run automatically on app startup; no separate migrate binary or
image needed.
2026-04-15 09:57:20 +08:00
ZhenYi
dfe4cb6207 refactor: local compile + docker push workflow
- build.js: cargo build first, then docker build — no more Docker-in-Docker
- .dockerignore: exclude target/ but re-include
  target/x86_64-unknown-linux-gnu/release/ so pre-built binaries
  are available in Docker build context
2026-04-15 09:53:45 +08:00
ZhenYi
f026dcfae2 fix: email-worker binary name mismatch
COPY path used email-server but cargo builds email-worker.
Also add --cache --cache-dir to kaniko builds for target cache.
2026-04-15 09:49:05 +08:00
ZhenYi
4a81fa3b96 fix: re-include release binaries in docker build context
The .dockerignore excluded the entire target/ directory, preventing
COPY of pre-built binaries into runtime-only Docker images.
Now explicitly allows target/x86_64-unknown-linux-gnu/release/.
2026-04-15 09:44:48 +08:00
ZhenYi
df976d16cb fix(operator): Time to_string and phase type mismatch
- Time does not implement Display, use .0 (inner DateTime<Utc>) and
  to_rfc3339() instead.
- phase is &str, convert to String to match JobStatusResult.phase.
2026-04-15 09:38:46 +08:00
ZhenYi
2d2e295bf3 refactor: build Rust binaries externally, COPY into minimal runtime images
- Strip builder stage from all Rust Dockerfiles; images now only contain
  the runtime and a pre-built binary copied from target/.
- build.js: cargo builds all Rust binaries first (using all CPU cores),
  then copies them into Docker images.
- .drone.yml: add cargo-build step before docker-build so kaniko can COPY
  the pre-compiled binaries without rebuilding inside the image.
2026-04-15 09:32:27 +08:00
ZhenYi
a3223a92b3 fix(drone): pass BUILD_TARGET to kaniko builds
The kaniko --build-arg flag was missing from all docker-build commands,
causing TARGET to be empty and cargo build to produce binaries in the
wrong directory (target//release/ instead of target/x86_64-unknown-linux-gnu/release/).
2026-04-15 09:18:53 +08:00
ZhenYi
93cfff9738 init 2026-04-15 09:08:09 +08:00