diff options
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cfb3e0a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,30 @@ +# Build stage +FROM oven/bun:latest AS build + +WORKDIR /app + +COPY package.json bun.lock* ./ +RUN bun install --frozen-lockfile + +COPY . . +RUN bun run build + +# Production stage +FROM nginx:alpine + +COPY --from=build /app/dist /usr/share/nginx/html +COPY <<'EOF' /etc/nginx/conf.d/default.conf +server { + listen 80; + server_name _; + root /usr/share/nginx/html; + index index.html; + + location / { + try_files $uri $uri/ /index.html; + } +} +EOF + +EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"]
\ No newline at end of file |
