-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathdockerfile
More file actions
40 lines (28 loc) · 923 Bytes
/
dockerfile
File metadata and controls
40 lines (28 loc) · 923 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM oven/bun:canary AS build
WORKDIR /app
COPY ./package.json ./
RUN bun install
COPY . .
ENV PUBLIC_VERSION=beta-1.0.0
ENV SNAPP_DEBUG=true
ENV DATABASE_URL="postgres://root:mysecretpassword@100.68.111.112:5432/local"
RUN bun --bun run build
FROM node:25-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
ENV PORT=1000
COPY --from=build /app/build ./build
COPY --from=build /app/package.json ./
COPY --from=build /app/config ./config
COPY --from=build /app/maxmind ./maxmind
COPY --from=build /app/project.inlang ./project.inlang
COPY --from=build /app/messages ./messages
COPY --from=build /app/drizzle.config.ts ./drizzle.config.ts
COPY --from=build /app/src/lib/server/db ./src/lib/server/db
COPY --from=build /app/static ./static
RUN npm install --omit=dev --legacy-peer-deps
ENV PUBLIC_VERSION=beta-1.0.0
ENV SNAPP_DEBUG=false
ENV PORT=1000
EXPOSE 1000
CMD ["node", "-r", "dotenv/config", "./build"]