Skip to content

Commit 78823ff

Browse files
committed
add non optimized dockerfile
1 parent 271873e commit 78823ff

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

.github/workflows/react.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,11 @@ jobs:
3030
file: ./react/Dockerfile
3131
push: true
3232
tags: ${{ secrets.DOCKERHUB_USERNAME }}/learning-tracker:latest, ${{ secrets.DOCKERHUB_USERNAME }}/learning-tracker:${{ github.sha }}
33+
34+
- name: Build and push non optimized Docker image
35+
uses: docker/build-push-action@v5
36+
with:
37+
context: ./react
38+
file: ./react/Dockerfile.no-optimization
39+
push: true
40+
tags: ${{ secrets.DOCKERHUB_USERNAME }}/learning-tracker:latest, ${{ secrets.DOCKERHUB_USERNAME }}/learning-tracker:${{ github.sha }}

react/Dockerfile.no-optimisation

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM node:20
2+
3+
WORKDIR /app
4+
5+
COPY package*.json ./
6+
RUN npm install
7+
8+
COPY . .
9+
10+
# Build the app (still okay)
11+
RUN npm run build
12+
13+
# ❌ Serve React app using Vite preview (NOT optimized for production)
14+
EXPOSE 4173
15+
CMD ["npm", "run", "preview"]

0 commit comments

Comments
 (0)