Skip to content

Commit

Permalink
modifying docker command in github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Prashant-flick committed Oct 2, 2024
1 parent 60be45d commit cdf4257
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,5 @@ jobs:
sudo docker pull prashantflick/paytm-turbo-user:latest
sudo docker stop user-paytm || true
sudo docker rm user-paytm || true
docker run -d -p 3001:3001 \
-e DATABASE_URL=${{secrets.DATABASE_URL}} \
-e NEXTAUTH_URL=${{secrets.NEXTAUTH_URL}} \
-e NEXTAUTH_SECRET=${{secrets.NEXTAUTH_SECRET}} \
-e GOOGLE_CLIENT_ID=${{secrets.GOOGLE_CLIENT_ID}} \
-e GOOGLE_CLIENT_SECRET=${{secrets.GOOGLE_CLIENT_SECRET}} \
prashantflick/paytm-turbo-user:latest
docker run --name user-paytm -d -p 3001:3001 -e DATABASE_URL=${{secrets.DATABASE_URL}} -e NEXTAUTH_URL=${{secrets.NEXTAUTH_URL}} -e NEXTAUTH_SECRET=${{secrets.NEXTAUTH_SECRET}} -e GOOGLE_CLIENT_ID=${{secrets.GOOGLE_CLIENT_ID}} -e GOOGLE_CLIENT_SECRET=${{secrets.GOOGLE_CLIENT_SECRET}} prashantflick/paytm-turbo-user:latest
4 changes: 3 additions & 1 deletion docker/Dockerfile.user
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ WORKDIR /user/src/app
COPY package.json package-lock.json turbo.json tsconfig.json ./

COPY apps/user-app ./apps/user-app
COPY apps/bank_webhook_handler ./apps/bank_webhook_handler
COPY packages ./packages

RUN npm install

RUN npm run db:generate

RUN npm run build-user-app
RUN npm run build-bank-webhook-app

CMD ["npm", "run", "start-user-app"]
CMD ["npm", "run", "start-user-app-and-bank-webhook"]
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
"lint": "turbo lint",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"db:generate": "cd packages/db && npx prisma generate && cd ../..",
"start-user-app": "cd apps/user-app && npm run dev && cd ../..",
"build-user-app": "cd apps/user-app && npm run build && cd ../.."
"start-user-app": "cd apps/user-app && npm run dev && cd ../.. && npm run start-bank-webhook",
"build-user-app": "cd apps/user-app && npm run build && cd ../..",
"build-bank-webhook-app": "cd apps/bank_webhook_handler && npm run build && cd ../..",
"start-bank-webhook": "cd apps/bank_webhook_handler && npm run start && cd ../.."
},
"devDependencies": {
"prettier": "^3.2.5",
Expand Down

0 comments on commit cdf4257

Please sign in to comment.