fixed
This commit is contained in:
+9
-3
@@ -5,6 +5,14 @@ FROM base AS install
|
||||
COPY package.json bun.lock ./
|
||||
RUN bun install --frozen-lockfile
|
||||
|
||||
# Runtime deps only: build/ already inlines svelte, kit, drizzle-orm & co, so the
|
||||
# devDependencies were ~640MB of dead weight per arch. drizzle-kit and its libsql
|
||||
# driver are the exception — `db:migrate` runs them at startup.
|
||||
FROM base AS runtime-deps
|
||||
COPY package.json bun.lock ./
|
||||
RUN bun install --production --frozen-lockfile \
|
||||
&& bun add --no-save drizzle-kit@1.0.0-beta.22 @libsql/client@0.17.3
|
||||
|
||||
FROM base AS build
|
||||
ENV NODE_ENV=production
|
||||
COPY --from=install /app/node_modules node_modules
|
||||
@@ -31,15 +39,13 @@ ENV NODE_ENV=production \
|
||||
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=runtime-deps /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
|
||||
COPY drizzle.config.ts package.json ./
|
||||
RUN bun run db:migrate
|
||||
VOLUME /app/data
|
||||
EXPOSE 3000
|
||||
|
||||
Reference in New Issue
Block a user