fix: dedicated scheduler Dockerfile with psql for migrations, remove Python splitter

This commit is contained in:
Celes Renata
2026-04-19 23:35:00 +00:00
parent 48fed18078
commit 0f2f0460a6
4 changed files with 43 additions and 4 deletions
@@ -33,7 +33,17 @@ spec:
- name: run-migrations
image: {{ $root.Values.image.registry }}/{{ $svc.image }}:{{ $root.Values.image.tag }}
imagePullPolicy: {{ $root.Values.image.pullPolicy }}
command: ["python", "-m", "services.shared.migrate"]
command: ["sh", "-c"]
args:
- |
for f in $(ls /app/infra/migrations/*.sql 2>/dev/null | sort); do
echo "Applying $(basename $f)..."
PGPASSWORD="$POSTGRES_PASSWORD" psql \
-h "$POSTGRES_HOST" -p "$POSTGRES_PORT" \
-U "$POSTGRES_USER" -d "$POSTGRES_DB" \
-f "$f" -v ON_ERROR_STOP=0 > /dev/null 2>&1 || true
done
echo "Migrations complete."
securityContext:
{{- include "stonks.containerSecurityContext" $root | nindent 12 }}
envFrom: