diff --git a/.dockerignore b/.dockerignore index 762a7ba..276bbec 100644 Binary files a/.dockerignore and b/.dockerignore differ diff --git a/Dockerfile b/Dockerfile index e57cdb8..e69de29 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +0,0 @@ -# Stage 1: Build Frontend -FROM node:18-alpine as build -WORKDIR /app -COPY package*.json ./ -RUN npm install -COPY . . -RUN npm run build - -# Stage 2: Serve with Nginx -FROM nginx:alpine -COPY --from=build /app/dist /usr/share/nginx/html -COPY nginx.conf /etc/nginx/nginx.conf -EXPOSE 80 -CMD ["nginx", "-g", "daemon off;"] diff --git a/index.html b/index.html index 13149e7..9d0c1f4 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,3 @@ - @@ -34,14 +33,14 @@ diff --git a/nginx.conf b/nginx.conf index 8645875..97684f0 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,38 +1 @@ -worker_processes 1; - -events { worker_connections 1024; } - -http { - include mime.types; - default_type application/octet-stream; - sendfile on; - keepalive_timeout 65; - - # Limite upload per allegati (es. foto/video ticket) - client_max_body_size 50M; - - server { - listen 80; - root /usr/share/nginx/html; - index index.html; - - # Compressione Gzip - gzip on; - gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; - - # Gestione SPA (React Router) - location / { - try_files $uri $uri/ /index.html; - } - - # Proxy API verso il backend - location /api/ { - proxy_pass http://backend:3001; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection 'upgrade'; - proxy_set_header Host $host; - proxy_cache_bypass $http_upgrade; - } - } -} +���z \ No newline at end of file diff --git a/package.json b/package.json index 072406a..8a06a22 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "preview": "vite preview" }, "dependencies": { + "@paypal/react-paypal-js": "^8.1.3", "lucide-react": "^0.344.0", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/server/Dockerfile b/server/Dockerfile index aee4f85..4f0dfdb 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -1,7 +1 @@ -FROM node:18-alpine -WORKDIR /app -COPY package*.json ./ -RUN npm install --production -COPY . . -EXPOSE 3001 -CMD ["node", "server.js"] +���^ \ No newline at end of file