Skip to content

Commit 10efc9e

Browse files
committed
Add Dockerfile and .dockerignore for client application
1 parent b0b3338 commit 10efc9e

3 files changed

Lines changed: 33 additions & 0 deletions

File tree

client/.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
dist/

client/Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Use an official node image as the base image
2+
FROM node:16-alpine
3+
4+
# Set the working directory
5+
WORKDIR /app
6+
7+
# Copy package.json and package-lock.json
8+
COPY package*.json ./
9+
10+
# Install dependencies
11+
RUN npm install
12+
13+
# Copy the rest of the application code
14+
COPY . .
15+
16+
# Set environment variable
17+
ENV VITE_BACKEND_URL=https://devhub-server-original.onrender.com
18+
19+
# Build the application
20+
RUN npm run build
21+
22+
# Expose the port the app runs on
23+
EXPOSE 3000
24+
25+
# Start the application
26+
CMD ["npm", "run", "serve"]

client/vercel.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"rewrites": [
3+
{"source": "/:a*", "destination": "/"}
4+
]
5+
}

0 commit comments

Comments
 (0)