build: add internal container deployment
This commit is contained in:
parent
b69de71029
commit
83efa5b051
3 changed files with 62 additions and 0 deletions
30
Containerfile
Normal file
30
Containerfile
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
FROM docker.io/oven/bun:1.3.14 AS deps
|
||||
|
||||
WORKDIR /app
|
||||
COPY package.json bun.lock ./
|
||||
RUN bun install --frozen-lockfile
|
||||
|
||||
FROM deps AS build
|
||||
|
||||
COPY . .
|
||||
RUN bun run build
|
||||
|
||||
FROM docker.io/oven/bun:1.3.14 AS runtime
|
||||
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production
|
||||
ENV HOST=0.0.0.0
|
||||
ENV PORT=3000
|
||||
ENV DATABASE_URL=file:/data/dimensionlab.sqlite
|
||||
ENV DASHBOARD_MIGRATIONS_DIR=/app/drizzle
|
||||
|
||||
COPY package.json bun.lock ./
|
||||
RUN bun install --frozen-lockfile --production
|
||||
COPY --from=build /app/build ./build
|
||||
COPY --from=build /app/drizzle ./drizzle
|
||||
|
||||
RUN mkdir -p /data
|
||||
VOLUME ["/data"]
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["bun", "build/index.js"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue