Skip to content

Commit 96b8ad2

Browse files
author
Nir-Bhay
committed
feat: add vercel config and dockerfile for easier deployment 🚀
1 parent 076aeea commit 96b8ad2

File tree

2 files changed

+18
-102
lines changed

2 files changed

+18
-102
lines changed

Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM node:18-slim AS builder
2+
WORKDIR /app
3+
COPY package*.json ./
4+
RUN npm install
5+
COPY . .
6+
RUN npm run build
7+
8+
FROM nginx:stable-alpine
9+
COPY --from=builder /app/dist /usr/share/nginx/html
10+
EXPOSE 80
11+
CMD ["nginx", "-g", "daemon off;"]

vercel.json

Lines changed: 7 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,8 @@
11
{
2-
"$schema": "https://openapi.vercel.sh/vercel.json",
3-
"version": 2,
4-
"framework": "vite",
5-
"buildCommand": "npm run build",
6-
"outputDirectory": "dist",
7-
"cleanUrls": true,
8-
"trailingSlash": false,
9-
"headers": [
10-
{
11-
"source": "/landing/(.*)",
12-
"headers": [
13-
{
14-
"key": "Cache-Control",
15-
"value": "public, max-age=3600, s-maxage=86400, stale-while-revalidate=604800"
16-
},
17-
{
18-
"key": "X-Robots-Tag",
19-
"value": "index, follow, max-image-preview:large, max-snippet:-1"
20-
},
21-
{
22-
"key": "Link",
23-
"value": "<https://markups.vercel.app/landing>; rel=\"canonical\""
24-
}
25-
]
26-
},
27-
{
28-
"source": "/landing",
29-
"headers": [
30-
{
31-
"key": "Cache-Control",
32-
"value": "public, max-age=3600, s-maxage=86400, stale-while-revalidate=604800"
33-
},
34-
{
35-
"key": "X-Robots-Tag",
36-
"value": "index, follow, max-image-preview:large, max-snippet:-1"
37-
},
38-
{
39-
"key": "Link",
40-
"value": "<https://markups.vercel.app/landing>; rel=\"canonical\""
41-
}
42-
]
43-
},
44-
{
45-
"source": "/assets/(.*)",
46-
"headers": [
47-
{
48-
"key": "Cache-Control",
49-
"value": "public, max-age=31536000, immutable"
50-
}
51-
]
52-
},
53-
{
54-
"source": "/(css|image|js)/(.*)",
55-
"headers": [
56-
{
57-
"key": "Cache-Control",
58-
"value": "public, max-age=31536000, immutable"
59-
}
60-
]
61-
},
62-
{
63-
"source": "/sw.js",
64-
"headers": [
65-
{
66-
"key": "Cache-Control",
67-
"value": "public, max-age=0, must-revalidate"
68-
},
69-
{
70-
"key": "Service-Worker-Allowed",
71-
"value": "/"
72-
}
73-
]
74-
},
75-
{
76-
"source": "/(.*)",
77-
"headers": [
78-
{
79-
"key": "X-Content-Type-Options",
80-
"value": "nosniff"
81-
},
82-
{
83-
"key": "X-Frame-Options",
84-
"value": "DENY"
85-
},
86-
{
87-
"key": "X-XSS-Protection",
88-
"value": "1; mode=block"
89-
}
90-
]
91-
}
92-
],
93-
"rewrites": [
94-
{
95-
"source": "/landing",
96-
"destination": "/landing/index.html"
97-
},
98-
{
99-
"source": "/(.*)",
100-
"destination": "/index.html"
101-
}
102-
]
103-
}
2+
"version": 2,
3+
"framework": "vite",
4+
"buildCommand": "npm run build",
5+
"outputDirectory": "dist",
6+
"regions": ["sfo1"],
7+
"cleanUrls": true
8+
}

0 commit comments

Comments
 (0)