feat: ci/cd flow

This commit is contained in:
2026-06-26 10:40:34 +02:00
parent 411fde5ffc
commit 0359db007e
7 changed files with 123 additions and 6 deletions
+6 -2
View File
@@ -15,10 +15,14 @@ FROM base AS release
ENV NODE_ENV=production \
DATABASE_URL=/app/data/db.sqlite \
HOST=0.0.0.0 \
PORT=3000
PORT=3000 \
ORIGIN=http://localhost:3000 \
REPOSITORY_URL=https://tea.urania.dev/api/v1/repos/urania/nadir-agent/releases/latest
# full node_modules: drizzle-kit (devDep) is needed for `drizzle-kit migrate` at startup
WORKDIR /app
COPY --from=install /app/node_modules node_modules
COPY --from=build /app/build build
COPY --from=build /app/config config
COPY drizzle drizzle
COPY drizzle.config.ts package.json ./
RUN mkdir -p /app/data
@@ -27,4 +31,4 @@ RUN bun run db:migrate
VOLUME /app/data
EXPOSE 3000
# apply migrations (creates db.sqlite if absent), then start the server
CMD ["bun ./build/index.js"]
CMD ["sh", "-c", "bun run db:migrate && bun /app/build/index.js"]