Commit Graph
56 Commits
Author SHA1 Message Date
asepharyana 769f61e8cd ci(deploy): push builds to attic binary cache (attic.asepharyana.my.id) 2026-08-10 15:06:58 +07:00
asepharyana 4797aca20f ci(deploy): poll service readiness instead of fixed 3s sleep
is-active after sleep 3 false-fails when the unit is still activating
(e.g. Next standalone boot >3s) — exit 3 flagged the deploy red even though
the service came up fine. Poll is-active up to 30s and only fail if it never
reaches 'active'.
2026-08-07 11:22:29 +07:00
asepharyana 9f91155944 ci(deploy): build+deploy frontend package (SSR standalone server)
Sebelumnya frontend hanya static export yang di-serve nginx di dalam package
proxy. Sekarang frontend = runtime mandiri (Next.js standalone :4017) yang
nginx proxikan ('/' -> Next server, '/api' + '/ws' -> backend :4001). Tambah
'frontend' ke matrix deploy agar dideploy + memulai unit gmw-frontend.
2026-08-07 10:46:02 +07:00
asepharyana 88484f12a9 ci: add Nix GC cleanup job on VPS after deploy 2026-08-04 13:57:44 +07:00
aseph f84bf723c5 ci: use free GHA Nix cache (disable FlakeHub cache, not subscribed) 2026-08-03 16:44:06 +07:00
asepharyana 24db0f19b1 ci: enable FlakeHub Cache (id-token: write + use-flakehub) 2026-08-03 16:20:15 +07:00
asepharyana 7d2bd75f6c ci: exclude e2e.test.ts from CI unit run (needs live backend API_BASE) 2026-08-01 22:21:55 +07:00
asepharyana b3a2f2ec10 ci: add test+typecheck gate before deploy
Sebelumnya CI hanya build nix -> deploy tanpa verifikasi — placeholder
tests sempat rusak berbulan-bulan tanpa terdeteksi. Job 'test' baru:
- pnpm install + tsc --noEmit + vitest run untuk backend & discord-gateway
- biome check (errors fail, warnings pass)
- build-and-deploy now needs: test
2026-08-01 22:10:28 +07:00
asepharyana a0b3f7e9b2 ci: publish flake to FlakeHub (rolling) 2026-08-01 17:58:19 +07:00
asepharyana 0daee56213 ci: migrate CI to GitHub Actions (deploy nix + mirror ke Gitea backup)
Mirror to Gitea / mirror (push) Successful in 26s
Build & Deploy (Nix) / build-and-deploy (backend) (push) Failing after 32m40s
Build & Deploy (Nix) / build-and-deploy (proxy) (push) Failing after 18m0s
Build & Deploy (Nix) / build-and-deploy (discord-gateway) (push) Failing after 18m0s
2026-08-01 16:40:27 +07:00
DeveloperandClaude Opus 4.8 5802d02e29 refactor: large codebase cleanup - consolidate schemas, migrate to Drizzle ORM, extract frontend components, modernize Docker builds
Build & Deploy / build-and-push (discord-gateway) (push) Failing after 2m22s
Build & Deploy / build-and-push (backend) (push) Failing after 3m22s
Build & Deploy / build-and-push (proxy) (push) Successful in 1m36s
Build & Deploy / deploy (push) Skipped
- Consolidate all DB schema definitions into packages/shared as single source of truth
- Migrate backend from raw SQL to Drizzle ORM across all modules
- Extract frontend inline UI into separate component files
- Refactor discord-gateway circuitBreaker into conversationState + moderationState
- Convert messageStore to Proxy singleton pattern
- Add validateBody/validateQuery middleware + Zod schemas for API endpoints
- Modernize Docker builds with multi-stage + pnpm deploy
- Migrate CI/CD from deployment to image-based pipeline
- Remove 60+ unused/dead files (~15K lines)
- Update color scheme from sky-blue to teal-cyan
- Move DB connection management to @bete/shared/database

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-27 21:54:31 +07:00
asepharyana 880c68fbab Revert "ci: migrate from GitHub Actions to GitLab CI/CD"
This reverts commit c64dd7c2ee.
2026-07-02 03:54:44 +07:00
asepharyana c64dd7c2ee ci: migrate from GitHub Actions to GitLab CI/CD
- Create .gitlab-ci.yml with Docker build + GitLab registry push + VPS deploy
- 4 build jobs (frontend, backend, discord-gateway, proxy) in parallel
- Uses Docker-in-Docker with BuildKit for cached multi-stage builds
- Deploy stage uses SCP for .env + docker-compose, then SSH for orchestration
- Images pushed to registry.gitlab.com/mytheclipse-group/gmw/

GitLab CI/CD secrets configured:
  - VPS_HOST: 45.127.35.244
  - VPS_USERNAME: root
  - VPS_SSH_KEY: (file type - SSH private key)
  - ENV_FILE: (env_var type - full .env content)

Remove old .github/workflows/deploy-docker.yml (GitHub Actions)
2026-07-02 01:46:18 +07:00
MythEclipseandClaude Opus 4.8 823b342c2c fix: remove --wait flag from docker compose up
The --wait flag causes the deploy to abort when a container exits
immediately (e.g., due to transient DB connection issue on startup).
With restart: unless-stopped, containers will auto-recover without
blocking the deployment pipeline.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 20:48:39 +07:00
MythEclipseandClaude Opus 4.8 c371317755 fix: add retry logic for docker compose pull transient errors
GitHub Container Registry pulls occasionally fail with 'connection reset
by peer'. Adding a 3-attempt retry loop with 5s backoff between pulls
to handle transient network errors gracefully.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 20:39:32 +07:00
MythEclipseandClaude Opus 4.8 60edb4576f fix(docker): create recordings directory with proper permissions
- Add recordings directory structure with .gitkeep, .gitignore, and README
- Update deployment script to set chmod 777 on recordings directory
- Fixes ENOENT/EACCES errors when discord-gateway tries to create user subdirectories
- Ensures container app user (UID 100) can write recording files

This resolves the crash on voice channel connection where the service
failed to create user-specific recording directories like:
- recordings/<user-id>/
- recordings/sessions/

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 20:31:43 +07:00
MythEclipse f981d65004 chore(ci): bump docker/setup-buildx-action and docker/login-action from v3 to v4 2026-06-02 23:19:38 +07:00
MythEclipse 0ef57033e3 chore(deps): bump discord.js-selfbot-v13 submodule 2026-06-02 23:19:27 +07:00
MythEclipseandClaude Opus 4.8 34719d3366 fix(ci): force remove stale containers before up to avoid name conflict
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 10:09:04 +07:00
MythEclipseandClaude Opus 4.8 1a794f35fb fix(ci): write .env and recordings to infra/docker/ relative to compose
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 10:00:40 +07:00
MythEclipseandClaude Opus 4.8 5fdf951435 fix(ci): proper git clone/pull pattern like ZeaVis-Edu
- Check if origin mismatch → rm and re-clone fresh
- Public repo — no auth needed for clone
- docker-compose.yml from repo source of truth

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 09:54:57 +07:00
MythEclipseandClaude Opus 4.8 e142bd5ad2 fix(ci): drop git clone, generate docker-compose inline instead
GITHUB_TOKEN can't auth git over HTTPS on VPS, so revert to inline
compose generation. nginx.conf already baked into proxy image.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 09:50:28 +07:00
MythEclipseandClaude Opus 4.8 53d16dc9cd fix(ci): use x-access-token for git clone/pull on private repo
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 09:47:30 +07:00
MythEclipseandClaude Opus 4.8 3d62477a68 fix(ci): update git remote URL before fetch on VPS
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 09:45:10 +07:00
MythEclipseandClaude Opus 4.8 5ae6b73c1f fix(ci): update repo URL to new location MythEclipse/GMW
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 09:42:14 +07:00
MythEclipseandClaude Opus 4.8 73efc716a5 fix(ci): use git-pull pattern like ZeaVis-Edu, all images from GHCR
- Replace build: blocks with image: from ghcr.io
- Simplify deploy: git clone/pull on VPS, then docker compose pull/up
- Remove SCP step entirely — nginx.conf baked into proxy image
- Rename containers to imphenbot-* to match existing VPS setup
- Fix backend port to 3000 for production

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 09:41:38 +07:00
MythEclipseandClaude Opus 4.8 bf0d0090c9 fix(ci): use SCP to copy docker-compose and nginx from repo instead of hardcoded cat
- Add proxy to build matrix
- Replace heredoc docker-compose generation with appleboy/scp-action
- Fix nginx upstream backend port to 3000 (matches prod WEBSERVER_PORT)
- Copy docker-compose.yml and nginx.conf from repo via SCP staging

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 09:03:13 +07:00
MythEclipseandClaude Opus 4.8 5a094c926a fix(frontend): pass VITE_BE_API_URL and VITE_BE_WS_URL as Docker build args
Vite embeds env vars at build time, not runtime. The frontend code uses
VITE_BE_API_URL/VITE_BE_WS_URL but the workflow was setting wrong names
(VITE_API_URL/VITE_WS_URL). Now Dockerfile accepts build args and
workflow passes production URLs during docker build.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 23:31:20 +07:00
MythEclipseandClaude Opus 4.6 02564e1302 fix(ci): remove --force-recreate from docker compose up
'up --force-recreate' after 'down' causes 'No such container' race.
After down, up creates fresh containers automatically.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-01 23:00:10 +07:00
MythEclipseandClaude Opus 4.6 bf5849f235 fix(ci): add docker compose down before up to resolve container name conflict
The VPS has orphan containers from previous deployments that conflict with
new compose up. Running compose down --remove-orphans first cleans them up.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-01 22:19:08 +07:00
MythEclipseandClaude Opus 4.6 ee540d11f6 fix(ci): lowercase GHCR owner name to fix 'repository name must be lowercase' error
`github.repository_owner` returns 'MythEclipse' (mixed case) which GHCR rejects.
Hardcode lowercase 'mytheclipse' to match GHCR requirements.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-01 21:59:06 +07:00
MythEclipseandClaude Opus 4.8 c48a0c5e3b refactor: split monolith into 3 microservices (frontend, backend, discord-gateway)
- Extract services into services/{frontend,backend,discord-gateway}
- Create packages/shared/ for shared logger, errors, utils, types
- Setup Modular MVC pattern in backend (controller→service→repository)
- Setup event-driven architecture in discord-gateway with Redis pub/sub
- Move Docker files to infra/docker/ with per-service Dockerfiles
- Update docker-compose.yml to use Traefik-only routing (no port exposes)
- Update GitHub Actions deploy workflow for multi-service matrix build
- Fix all import paths and resolve type errors across all services
- All 3 services pass tsc --noEmit clean

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 21:44:29 +07:00
MythEclipse 1ab0fdf884 feat(deploy): update ssh-action version and remove container_name from docker-compose 2026-06-01 11:27:51 +07:00
MythEclipse 49e9197ce0 feat(deploy): update deployment workflow and remove obsolete Docker publish workflow 2026-06-01 11:07:25 +07:00
MythEclipse 942b446ff5 feat(deploy): add GitHub Actions workflow for deploying GMW to VPS 2026-06-01 10:56:23 +07:00
MythEclipse a7b3692982 feat(docker): update Docker configuration and add build workflow 2026-06-01 10:53:20 +07:00
Asep Haryana Saputra 4938aa3a2f ci: remove obsolete deploy.yml, replaced by notify-parent.yml 2026-05-29 15:00:01 +07:00
Asep Haryana Saputra 3ff51fd72e ci: remove VPS deploy step; build/push/deploy now handled by monorepo 2026-05-29 14:09:02 +07:00
Asep Haryana Saputra bdf0f302a7 ci: add notify-parent workflow for monorepo integration 2026-05-29 14:08:23 +07:00
Asep Haryana Saputra 0530bf9a60 feat(deploy): update Docker Compose configuration for improved app deployment 2026-05-21 12:14:18 +00:00
Asep Haryana Saputra 9b2472ac58 feat(deploy): enhance deployment workflow with improved Docker setup and SSH actions 2026-05-21 12:10:30 +00:00
MythEclipse 80957d1eb3 fix: update Docker image tag to use commit SHA for versioning 2026-05-19 16:34:23 +07:00
MythEclipse 4687443fd4 fix: remove unused GITHUB_TOKEN and REPO_URL from deployment workflow 2026-05-19 16:31:28 +07:00
MythEclipse 0fe61e0634 fix: update permissions in deploy workflow and correct GITHUB_TOKEN reference 2026-05-19 16:15:50 +07:00
MythEclipse b51210f9b0 a 2026-05-19 16:07:50 +07:00
MythEclipse a12abaccd6 refactor: configure git safe directory for deployment 2026-05-19 16:01:14 +07:00
MythEclipse b9d75ce9a0 refactor: update deployment process to use git clone for VPS 2026-05-19 15:52:47 +07:00
MythEclipse b789655ce9 fix: register new github public remote for selfbot submodule and update workflow to checkout recursively 2026-05-17 22:53:13 +07:00
MythEclipse 079c6c3399 fix: implement smart docker compose vs legacy docker-compose command fallback for VPS 2026-05-17 22:08:03 +07:00
MythEclipse 88a02f2a66 fix: replace appleboy actions with native zero-dependency ssh + rsync for bulletproof deploys 2026-05-17 22:05:35 +07:00