Skip to content

Commit

Permalink
Add Dockerfile and .dockerignore for client application
Browse files Browse the repository at this point in the history
  • Loading branch information
deepraj21 committed Oct 9, 2024
1 parent b0b3338 commit 10efc9e
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
dist/
26 changes: 26 additions & 0 deletions client/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Use an official node image as the base image
FROM node:16-alpine

# Set the working directory
WORKDIR /app

# Copy package.json and package-lock.json
COPY package*.json ./

# Install dependencies
RUN npm install

# Copy the rest of the application code
COPY . .

# Set environment variable
ENV VITE_BACKEND_URL=https://devhub-server-original.onrender.com

# Build the application
RUN npm run build

# Expose the port the app runs on
EXPOSE 3000

# Start the application
CMD ["npm", "run", "serve"]
5 changes: 5 additions & 0 deletions client/vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"rewrites": [
{"source": "/:a*", "destination": "/"}
]
}

0 comments on commit 10efc9e

Please sign in to comment.