Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Step 1: Start with a base image
FROM node:18.12.1 as build

# Step 2: Set a working directory
WORKDIR /app

# Step 3: Copy package.json and package-lock.json
COPY package*.json ./

# Step 4: Install dependencies
RUN npm install

# Step 5: Copy the rest of your application
COPY . .

# Step 6: Build the application
RUN npm run build

# Step 7: Start with a base image for the server
FROM nginx:1.21.6-alpine

# Step 8: Copy the build output to replace the default nginx contents.
COPY --from=build /app/build /usr/share/nginx/html

# Step 9: Expose port 80
EXPOSE 80

# Step 10: Start Nginx
CMD ["nginx", "-g", "daemon off;"]

# To deploy on ezhost.dev you need to deploy from a git repo,
#paste the url of the repo,
#when the app is running, go on the expose part,
#the port is 80 and choose the subdomain you want
#after go on https://the_subdomain_you_choose.ezhost-app.com and you will see your trello board
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "trello-clone",
"version": "0.1.0",
"private": true,
"homepage": "https://LowBP.github.io/trello-clone",
"homepage": ".",
"dependencies": {
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
Expand Down Expand Up @@ -56,4 +56,4 @@
"react-router-dom": "^6.5.0",
"typescript": "^4.9.4"
}
}
}