-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (25 loc) · 1.59 KB
/
Copy pathDockerfile
File metadata and controls
38 lines (25 loc) · 1.59 KB
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
FROM oven/bun:1.3.14-slim AS base
WORKDIR /app
# ── install ──────────────────────────────────────────────────────────────────
FROM base AS install
COPY package.json bun.lock ./
RUN --mount=type=cache,target=/root/.bun/install/cache \
bun install --frozen-lockfile
# ── build ────────────────────────────────────────────────────────────────────
FROM base AS build
ENV NODE_ENV=production
COPY --from=install /app/node_modules ./node_modules
COPY . .
RUN bun run build
# ── release ──────────────────────────────────────────────────────────────────
FROM nginx:alpine AS release
LABEL org.opencontainers.image.title="@germondai/blog" \
org.opencontainers.image.description="Self-hostable personal blog - FOSS, Astro 6, single-file config" \
org.opencontainers.image.url="https://github.com/germondai/blog" \
org.opencontainers.image.source="https://github.com/germondai/blog" \
org.opencontainers.image.licenses="AGPL-3.0-or-later" \
org.opencontainers.image.authors="germondai <germondai@gmail.com>"
COPY --from=build /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]