From 3ce4148120bc27cd69b60dd9dc4d397075a3e84f Mon Sep 17 00:00:00 2001 From: Marcio Bevervanso Date: Wed, 17 Jun 2026 13:02:46 -0300 Subject: [PATCH] Adiciona Dockerfile e nginx.conf para deploy no Coolify Co-Authored-By: Claude Sonnet 4.6 --- Dockerfile | 31 +++++++++++++++++++++++++++++++ nginx.conf | 11 +++++++++++ 2 files changed, 42 insertions(+) create mode 100644 Dockerfile create mode 100644 nginx.conf diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f7e4625 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,31 @@ +# Build phase +FROM node:20-alpine AS builder + +WORKDIR /app + +# Copy dependency info +COPY package.json package-lock.json ./ + +# Install all dependencies +RUN npm ci + +# Copy the rest of the application code +COPY . . + +# Build the application +RUN npm run build + +# Serve phase +FROM nginx:alpine + +# Copy the build output to replace the default nginx contents +COPY --from=builder /app/dist /usr/share/nginx/html + +# Copy our custom nginx configuration +COPY nginx.conf /etc/nginx/conf.d/default.conf + +# Expose port 8080 +EXPOSE 8080 + +# Start nginx +CMD ["nginx", "-g", "daemon off;"] diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..69e5ffb --- /dev/null +++ b/nginx.conf @@ -0,0 +1,11 @@ +server { + listen 8080; + server_name _; + + root /usr/share/nginx/html; + index index.html; + + location / { + try_files $uri $uri/ /index.html; + } +}