feat: ci/cd flow
This commit is contained in:
+6
-2
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user