From 852dec099d0161272a0406b1618f5307e353a7d3 Mon Sep 17 00:00:00 2001 From: ZhenYi <434836402@qq.com> Date: Wed, 15 Apr 2026 09:57:20 +0800 Subject: [PATCH] remove migrate service Migrations run automatically on app startup; no separate migrate binary or image needed. --- .drone.yml | 4 ---- docker/migrate.Dockerfile | 12 ------------ scripts/build.js | 3 +-- scripts/push.js | 2 +- 4 files changed, 2 insertions(+), 19 deletions(-) delete mode 100644 docker/migrate.Dockerfile diff --git a/.drone.yml b/.drone.yml index b1093e3..e879701 100644 --- a/.drone.yml +++ b/.drone.yml @@ -47,7 +47,6 @@ steps: --package gitserver \ --package email-server \ --package git-hook \ - --package migrate-cli \ --package operator \ --package static-server @@ -72,9 +71,6 @@ steps: /kaniko/executor --context . --dockerfile docker/git-hook.Dockerfile \ --cache --cache-dir target \ --destination ${REGISTRY}/git-hook:${TAG} --destination ${REGISTRY}/git-hook:latest - /kaniko/executor --context . --dockerfile docker/migrate.Dockerfile \ - --cache --cache-dir target \ - --destination ${REGISTRY}/migrate:${TAG} --destination ${REGISTRY}/migrate:latest /kaniko/executor --context . --dockerfile docker/operator.Dockerfile \ --cache --cache-dir target \ --destination ${REGISTRY}/operator:${TAG} --destination ${REGISTRY}/operator:latest diff --git a/docker/migrate.Dockerfile b/docker/migrate.Dockerfile deleted file mode 100644 index 0a824fb..0000000 --- a/docker/migrate.Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -# Runtime only — binary built externally via cargo -FROM debian:bookworm-slim - -RUN apt-get update && apt-get install -y --no-install-recommends \ - ca-certificates libssl3 \ - && rm -rf /var/lib/apt/lists/* - -WORKDIR /app -COPY target/x86_64-unknown-linux-gnu/release/migrate /app/migrate - -# Run migrations via: docker run --rm myapp/migrate up -ENTRYPOINT ["/app/migrate"] diff --git a/scripts/build.js b/scripts/build.js index bb3aeab..017941a 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -23,7 +23,7 @@ const REGISTRY = process.env.REGISTRY || 'harbor.gitdata.me/gta_team'; const TAG = process.env.TAG || 'latest'; const BUILD_TARGET = process.env.TARGET || 'x86_64-unknown-linux-gnu'; -const RUST_SERVICES = ['app', 'gitserver', 'email-worker', 'git-hook', 'migrate', 'operator', 'static']; +const RUST_SERVICES = ['app', 'gitserver', 'email-worker', 'git-hook', 'operator', 'static']; const ALL_SERVICES = [...RUST_SERVICES, 'frontend']; const args = process.argv.slice(2); @@ -48,7 +48,6 @@ if (rustTargets.length > 0) { 'gitserver': 'gitserver', 'email-worker': 'email-server', 'git-hook': 'git-hook', - 'migrate': 'migrate-cli', 'operator': 'operator', 'static': 'static-server', }; diff --git a/scripts/push.js b/scripts/push.js index f6999f3..7a19e85 100644 --- a/scripts/push.js +++ b/scripts/push.js @@ -20,7 +20,7 @@ const TAG = process.env.TAG || process.env.GITHUB_SHA?.substring(0, 8) || 'lates const DOCKER_USER = process.env.DOCKER_USER || process.env.HARBOR_USERNAME; const DOCKER_PASS = process.env.DOCKER_PASS || process.env.HARBOR_PASSWORD; -const SERVICES = ['app', 'gitserver', 'email-worker', 'git-hook', 'migrate', 'operator', 'static', 'frontend']; +const SERVICES = ['app', 'gitserver', 'email-worker', 'git-hook', 'operator', 'static', 'frontend']; const args = process.argv.slice(2); const targets = args.length > 0 ? args : SERVICES;