Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

commit #286

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
8 changes: 5 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
# cloning repo of workflow
- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v3
# install node js in new machine
with:
node-version: '20'

Expand All @@ -20,6 +22,6 @@ jobs:

- name: Generate prisma client
run: npm run db:generate

- name: Run Build
run: npm run build
24 changes: 12 additions & 12 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ jobs:
context: .
file: ./docker/Dockerfile.user
push: true
tags: 100xdevs/week-18-class:latest # Replace with your Docker Hub username and repository
tags: prayag101/week-19-class:latest # Replace with your Docker Hub username and repository

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

- name: Deploy to EC2
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_KEY }}
script: |
sudo docker pull 100xdevs/week-18-class:latest
sudo docker stop web-app || true
sudo docker rm web-app || true
sudo docker run -d --name web-app -p 3005:3000 100xdevs/week-18-class:latest
# - name: Deploy to EC2
# uses: appleboy/ssh-action@master
# with:
# host: ${{ secrets.SSH_HOST }}
# username: ${{ secrets.SSH_USERNAME }}
# key: ${{ secrets.SSH_KEY }}
# script: |
# sudo docker pull 100xdevs/week-18-class:latest
# sudo docker stop web-app || true
# sudo docker rm web-app || true
# sudo docker run -d --name web-app -p 3005:3000 100xdevs/week-18-class:latest
21 changes: 21 additions & 0 deletions apps/docker/dockerfile.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM node:20.12.0-alpine3.19

WORKDIR /usr/src/app

COPY package.json package-lock.json turbo.json tsconfig.json ./

COPY apps ./apps
COPY packages ./packages




# Install dependencies
RUN npm install
# Can you add a script to the global package.json that does this?
RUN cd packages/db && npx prisma generate && cd ../..

# Can you filter the build down to just one app?
RUN npm run build

CMD ["npm", "run", "start-user-app"]
3 changes: 3 additions & 0 deletions apps/user-app/app/(dashboard)/p2p/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { SendCard } from "../../../components/SendCard";




export default function() {
return <div className="w-full">
<SendCard />
Expand Down
Empty file.