Skip to content

Commit 27a845a

Browse files
authored
Merge pull request #3 from noelleasta69/pranav/branch1
Pranav/branch1
2 parents c032210 + c084e97 commit 27a845a

File tree

3 files changed

+32
-14
lines changed

3 files changed

+32
-14
lines changed

.github/workflows/deploy.yml

+13-13
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ jobs:
2424
context: .
2525
file: ./docker/Dockerfile.user
2626
push: true
27-
tags: 100xdevs/week-18-class:latest # Replace with your Docker Hub username and repository
27+
tags: noelleasta69/week-18-cicd:latest # Replace with your Docker Hub username and repository
2828

2929
- name: Verify Pushed Image
30-
run: docker pull 100xdevs/week-18-class:latest # Replace with your Docker Hub username and repository
30+
run: docker pull noelleasta69/week-18-cicd:latest # Replace with your Docker Hub username and repository
3131

32-
- name: Deploy to EC2
33-
uses: appleboy/ssh-action@master
34-
with:
35-
host: ${{ secrets.SSH_HOST }}
36-
username: ${{ secrets.SSH_USERNAME }}
37-
key: ${{ secrets.SSH_KEY }}
38-
script: |
39-
sudo docker pull 100xdevs/week-18-class:latest
40-
sudo docker stop web-app || true
41-
sudo docker rm web-app || true
42-
sudo docker run -d --name web-app -p 3005:3000 100xdevs/week-18-class:latest
32+
# - name: Deploy to EC2
33+
# uses: appleboy/ssh-action@master
34+
# with:
35+
# host: ${{ secrets.SSH_HOST }}
36+
# username: ${{ secrets.SSH_USERNAME }}
37+
# key: ${{ secrets.SSH_KEY }}
38+
# script: |
39+
# sudo docker pull 100xdevs/week-18-class:latest
40+
# sudo docker stop web-app || true
41+
# sudo docker rm web-app || true
42+
# sudo docker run -d --name web-app -p 3005:3000 100xdevs/week-18-class:latest

Dockerfile

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM node:20.12.0-alpine3.19
2+
3+
WORKDIR /usr/src/app
4+
5+
COPY package.json package-lock.json turbo.json tsconfig.json ./
6+
7+
COPY apps ./apps
8+
COPY packages ./packages
9+
10+
# Install dependencies
11+
RUN npm install
12+
# Can you add a script to the global package.json that does this?
13+
RUN npm run db:generate
14+
15+
# Can you filter the build down to just one app?
16+
RUN npm run build
17+
18+
CMD ["npm", "run", "start-user-app"]

apps/bank-webhook/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import express from "express";
22
import db from "@repo/db/client";
33
const app = express();
44

5-
app.use(express.json())
5+
app.use(express.json()) // commnet
66

77
app.post("/hdfcWebhook", async (req, res) => {
88
//TODO: Add zod validation here?

0 commit comments

Comments
 (0)