From 8ea1e231fd11bf002f9a61fe5b1f3a8173769d23 Mon Sep 17 00:00:00 2001 From: frakarr Date: Sun, 7 Dec 2025 22:44:00 +0100 Subject: [PATCH] feat: Integrate PayPal for payments Adds the `@paypal/react-paypal-js` dependency and updates import maps to support PayPal integration. Cleans up Dockerfile and Nginx configuration, removing them as they are no longer needed in this version. --- .dockerignore | Bin 102 -> 136 bytes Dockerfile | 14 -------------- index.html | 11 +++++------ nginx.conf | 39 +-------------------------------------- package.json | 1 + server/Dockerfile | 8 +------- 6 files changed, 8 insertions(+), 65 deletions(-) diff --git a/.dockerignore b/.dockerignore index 762a7ba24895c1f7c7e89138570fbbdb5eaf7d9e..276bbec6497998dcc0f46046911191732494e1c2 100644 GIT binary patch literal 136 zcmaFAfA9PKd*gsOOBP6k196$QE)xfkW&~m&VlV*`UO=o}2_$5I7=nu6EC?gh8A8j! Y#jB35hO;3I6nmJ|<8rux;vj?K0B1~FyZ`_I literal 102 zcmYk!!3}^Q3`XI5cd;(P1`I$9{WV0Oh9ZgEOFVgbhwt#J3PMr2GmIozCqB{)>L7ML l_^u5k8c(z(YPr=XhBzph= 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