feat: add migrate-owner endpoint for todos reassignment
Some checks failed
CI/CD / test (push) Successful in 28s
CI/CD / deploy (push) Failing after 2s

This commit is contained in:
2026-01-30 13:52:14 +00:00
parent 8407dde30b
commit 73bf9a69b1
5 changed files with 439 additions and 137 deletions

View File

@@ -1,15 +1,16 @@
FROM oven/bun:1 AS base
WORKDIR /app
# Install postgresql-client for SQL fallback
RUN apt-get update && apt-get install -y postgresql-client && rm -rf /var/lib/apt/lists/*
# Install dependencies
COPY package.json bun.lock* ./
RUN bun install --frozen-lockfile 2>/dev/null || bun install
# Copy source
# Copy source and init script
COPY . .
# Generate migrations and run
# Cache buster: 2026-01-30-v3
EXPOSE 3100
RUN apt-get update && apt-get install -y postgresql-client && rm -rf /var/lib/apt/lists/*
COPY init-tables.sql /app/init-tables.sql
CMD ["sh", "-c", "echo 'Running init SQL...' && psql \"$DATABASE_URL\" -f /app/init-tables.sql 2>&1 && echo 'Init SQL done' && echo 'Running db:push...' && yes | bun run db:push 2>&1; echo 'db:push exit code:' $? && echo 'Starting server...' && bun run start"]
CMD ["sh", "-c", "echo 'Waiting for DB...' && sleep 5 && echo 'Running init SQL...' && psql \"$DATABASE_URL\" -f /app/init-tables.sql 2>&1 && echo 'Init SQL done' && echo 'Running db:push...' && yes | bun run db:push 2>&1; echo 'db:push exit code:' $? && echo 'Starting server...' && bun run start"]