remove migrate service

Migrations run automatically on app startup; no separate migrate binary or
image needed.
This commit is contained in:
ZhenYi 2026-04-15 09:57:20 +08:00
parent dfe4cb6207
commit 852dec099d
4 changed files with 2 additions and 19 deletions

View File

@ -47,7 +47,6 @@ steps:
--package gitserver \ --package gitserver \
--package email-server \ --package email-server \
--package git-hook \ --package git-hook \
--package migrate-cli \
--package operator \ --package operator \
--package static-server --package static-server
@ -72,9 +71,6 @@ steps:
/kaniko/executor --context . --dockerfile docker/git-hook.Dockerfile \ /kaniko/executor --context . --dockerfile docker/git-hook.Dockerfile \
--cache --cache-dir target \ --cache --cache-dir target \
--destination ${REGISTRY}/git-hook:${TAG} --destination ${REGISTRY}/git-hook:latest --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 \ /kaniko/executor --context . --dockerfile docker/operator.Dockerfile \
--cache --cache-dir target \ --cache --cache-dir target \
--destination ${REGISTRY}/operator:${TAG} --destination ${REGISTRY}/operator:latest --destination ${REGISTRY}/operator:${TAG} --destination ${REGISTRY}/operator:latest

View File

@ -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"]

View File

@ -23,7 +23,7 @@ const REGISTRY = process.env.REGISTRY || 'harbor.gitdata.me/gta_team';
const TAG = process.env.TAG || 'latest'; const TAG = process.env.TAG || 'latest';
const BUILD_TARGET = process.env.TARGET || 'x86_64-unknown-linux-gnu'; 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 ALL_SERVICES = [...RUST_SERVICES, 'frontend'];
const args = process.argv.slice(2); const args = process.argv.slice(2);
@ -48,7 +48,6 @@ if (rustTargets.length > 0) {
'gitserver': 'gitserver', 'gitserver': 'gitserver',
'email-worker': 'email-server', 'email-worker': 'email-server',
'git-hook': 'git-hook', 'git-hook': 'git-hook',
'migrate': 'migrate-cli',
'operator': 'operator', 'operator': 'operator',
'static': 'static-server', 'static': 'static-server',
}; };

View File

@ -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_USER = process.env.DOCKER_USER || process.env.HARBOR_USERNAME;
const DOCKER_PASS = process.env.DOCKER_PASS || process.env.HARBOR_PASSWORD; 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 args = process.argv.slice(2);
const targets = args.length > 0 ? args : SERVICES; const targets = args.length > 0 ? args : SERVICES;