diff --git a/Dockerfile b/Dockerfile index 07789e9..0ad4371 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,4 +18,33 @@ COPY --chown=nginx:nginx --from=builder /app/dist /usr/share/nginx/html COPY --chown=nginx:nginx nginx.conf /etc/nginx/nginx.conf RUN mkdir -p /etc/nginx/tmp && chown -R nginx:nginx /etc/nginx/tmp +EXPOSE 8080 CMD ["nginx", "-g", "daemon off;"] + + +# Old Dockerfile for Root User +# # Build stage +# FROM node:20-alpine AS builder + +# WORKDIR /app + +# COPY package*.json ./ +# RUN npm ci + +# COPY . . + +# # Build without type checking (vite build only) +# # Pass SIMPLE_MODE environment variable if provided +# ARG SIMPLE_MODE=false +# ENV SIMPLE_MODE=$SIMPLE_MODE +# RUN npm run build -- --mode production + +# # Production stage +# FROM nginx:alpine + +# COPY --from=builder /app/dist /usr/share/nginx/html +# COPY nginx.conf /etc/nginx/nginx.conf + +# EXPOSE 8080 + +# CMD ["nginx", "-g", "daemon off;"] diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 5a09083..2dc72bf 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -7,5 +7,5 @@ services: SIMPLE_MODE: false # false for default mode, true for simple mode container_name: bentopdf ports: - - '3000:8080' + - '8080:8080' restart: unless-stopped diff --git a/docker-compose.yml b/docker-compose.yml index a95e106..494eff5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,4 +6,4 @@ services: container_name: bentopdf restart: unless-stopped ports: - - '3000:8080' + - '8080:8080'