diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c8b64f0e..0d8cdc9b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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' @@ -20,6 +22,6 @@ jobs: - name: Generate prisma client run: npm run db:generate - + - name: Run Build run: npm run build diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index acbed6e5..c56a7000 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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 \ No newline at end of file + # - 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 \ No newline at end of file diff --git a/apps/docker/dockerfile.user b/apps/docker/dockerfile.user new file mode 100644 index 00000000..fa096b97 --- /dev/null +++ b/apps/docker/dockerfile.user @@ -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"] \ No newline at end of file diff --git a/apps/user-app/app/(dashboard)/p2p/page.tsx b/apps/user-app/app/(dashboard)/p2p/page.tsx index 29333766..a4f36abf 100644 --- a/apps/user-app/app/(dashboard)/p2p/page.tsx +++ b/apps/user-app/app/(dashboard)/p2p/page.tsx @@ -1,5 +1,8 @@ import { SendCard } from "../../../components/SendCard"; + + + export default function() { return
diff --git a/apps/user-app/components/newcomponent.tsx b/apps/user-app/components/newcomponent.tsx new file mode 100644 index 00000000..e69de29b