-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (21 loc) · 773 Bytes
/
Copy pathDockerfile
File metadata and controls
33 lines (21 loc) · 773 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
# LiteFS imagen base
FROM flyio/litefs:0.5 AS litefs
# Builder imagen base (Bun)
FROM oven/bun:1.2.18-alpine AS builder
WORKDIR /app
COPY package.json bun.lock tsconfig.json ./
RUN bun install --production --frozen-lockfile
COPY . .
RUN bun build --compile --minify-whitespace --minify-syntax --target bun --outfile server ./src/index.ts
# Production imagen base
FROM alpine:latest
# Install LiteFS on Production File System
COPY --from=litefs /usr/local/bin/litefs /usr/local/bin/litefs
# LiteFS Dependencies
RUN apk add ca-certificates fuse3 sqlite libstdc++ libgcc
RUN mkdir -p /var/lib/litefs /litefs
WORKDIR /app
COPY --from=builder /app/server .
# LiteFS Config
COPY litefs.yml /etc/litefs.yml
ENTRYPOINT ["litefs", "mount", "-config", "/etc/litefs.yml"]