Commit Graph
17 Commits
Author SHA1 Message Date
asepharyana e0d6077a65 refactor(ci): remove automated deploy, add manual deploy.sh
CI now only builds + pushes images to GitLab Container Registry.
Deploy is done manually via deploy.sh with specific SHA tag support.

Usage: ./deploy.sh [sha]  # default: latest
2026-07-05 04:06:41 +07:00
asepharyana b5d4e46b79 fix(ci): deploy by SHA tag, not mutable :latest
Deploy now pulls images pinned to $CI_COMMIT_SHA instead of :latest,
eliminating race-condition deployments where a concurrent pipeline
overwrites the mutable latest tag before deploy runs.

Changes:
- docker-compose.yml: image tags use ${IMAGE_TAG:-latest} env var
- deploy step: IMAGE_TAG=$CI_COMMIT_SHA docker compose pull + up
- scp docker-compose.yml to VPS before running deploy commands
2026-07-05 03:43:13 +07:00
asepharyana 27e929580e feat: update components and hooks to use get_untracked for improved performance 2026-07-04 03:03:36 +07:00
asepharyana c5a9371e71 fix(infra): nginx upstream DNS staleness — 502 after backend restart
- Replace upstream blocks with variable-based proxy_pass + Docker DNS
  resolver (127.0.0.11) so nginx resolves hostnames dynamically on
  each request instead of caching at startup only.
- Add explicit 'docker compose restart proxy' in CI deploy step
  (belt-and-suspenders: also forces nginx restart after deploy).
- Remove no-op sed commands from CI (docker-compose.yml already uses
  GitLab registry, no ghcr.io replacements needed).

Root cause: docker compose up -d only recreates containers whose image
changed. When backend container is recreated (new Docker IP), nginx
still caches the old IP → 502 Bad Gateway on /api/*
2026-07-02 04:22:16 +07:00
asepharyana edc1a2d1fc chore: restore .gitlab-ci.yml after revert 2026-07-02 03:57:13 +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 26d33dd76b Revert "ci: simplify GitLab CI — SSH → git pull → docker compose up -d --build"
This reverts commit a62c23f1e8.
2026-07-02 03:54:44 +07:00
asepharyana 3b64a5892f Revert "ci: switch to debian:stable-slim for SSH compatibility"
This reverts commit 0da9839b3a.
2026-07-02 03:54:44 +07:00
asepharyana 10839141d9 Revert "ci: add Docker build + GitLab Container Registry push before deploy"
This reverts commit 90b317731b.
2026-07-02 03:54:44 +07:00
asepharyana 9e315a9574 Revert "ci: remove docker tag — shared runners don't have it"
This reverts commit 13bba60e3a.
2026-07-02 03:54:44 +07:00
asepharyana ba399e6621 Revert "ci: add GIT_SUBMODULE_STRATEGY for vendor dependencies"
This reverts commit 7b106fe562.
2026-07-02 03:54:44 +07:00
asepharyana 7b106fe562 ci: add GIT_SUBMODULE_STRATEGY for vendor dependencies 2026-07-02 02:33:54 +07:00
asepharyana 13bba60e3a ci: remove docker tag — shared runners don't have it 2026-07-02 02:17:54 +07:00
asepharyana 90b317731b ci: add Docker build + GitLab Container Registry push before deploy 2026-07-02 02:11:46 +07:00
asepharyana 0da9839b3a ci: switch to debian:stable-slim for SSH compatibility 2026-07-02 01:55:21 +07:00
asepharyana a62c23f1e8 ci: simplify GitLab CI — SSH → git pull → docker compose up -d --build
Remove Docker-in-Docker, registry push/pull, SCP complexity.
Pipeline now just SSHs into VPS and rebuilds from source.

Secrets configured:
  VPS_HOST, VPS_USERNAME, VPS_SSH_KEY (file type)
2026-07-02 01:46:52 +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