From 042bb9063c469406d5f59282ab94e95e8cdf401e Mon Sep 17 00:00:00 2001 From: IwanIDev Date: Wed, 4 Mar 2026 16:09:43 +0000 Subject: Add containerisation setup --- Dockerfile | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Dockerfile (limited to 'Dockerfile') 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 -- cgit