diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c25b2d9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM node:20-alpine AS builder +WORKDIR /app +COPY package.json package-lock.json ./ +RUN npm ci +COPY . . +RUN npm run build + +FROM nginx:alpine +COPY nginx.conf /etc/nginx/conf.d/default.conf +COPY --from=builder /app/dist /usr/share/nginx/html diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..1777b9f --- /dev/null +++ b/nginx.conf @@ -0,0 +1,11 @@ +server { + listen 80; + root /usr/share/nginx/html; + index index.html; + + include /etc/nginx/mime.types; + + location / { + try_files $uri $uri/ /index.html; + } +}