Skip to content

Commit 3120d0d

Browse files
authored
Merge pull request #25 from Embula-Project/EP-1-Customer-Menu-Section
feat:aws deploy
2 parents 73900d1 + 622d117 commit 3120d0d

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

.github/workflows/maven.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,29 @@ jobs:
4444
push: true
4545
tags: docker.io/dewmink/embula-backend:latest
4646

47+
- name: Deploy to EC2
48+
uses: appleboy/ssh-action@v0.1.7
49+
with:
50+
host : ${{secret.EC2_HOST}}
51+
username : ${{secret.EC2_USER}}
52+
key: ${{secret.EC2_KEY}}
53+
script:
54+
docker pull dewmink/embula-backend:latest
55+
docker stop embula-backend || true
56+
docker rm embula-backend || true
57+
docker run -d \
58+
--name embula-backend \
59+
-p 8081:8081 \
60+
-e MYSQL_URL=${{ secrets.MYSQL_URL }} \
61+
-e Username=${{ secrets.DB_USERNAME }} \
62+
-e Password=${{ secrets.DB_PASSWORD }} \
63+
-e JWT_SECRET=${{ secrets.JWT_SECRET }} \
64+
-e TOKEN_VALIDITY=${{ secrets.TOKEN_VALIDITY }} \
65+
-e REFRESH_TOKEN_VALIDITY=${{ secrets.REFRESH_TOKEN_VALIDITY }} \
66+
-e STRIPE_SECRET=${{ secrets.STRIPE_SECRET }} \
67+
-e EMAIL_USERNAME=${{ secrets.EMAIL_USERNAME }} \
68+
-e EMAIL_PASSWORD=${{ secrets.EMAIL_PASSWORD }} \
69+
-e ADMIN_EMAIL=${{ secrets.ADMIN_EMAIL }} \
70+
dewmink/embula-backend:latest
71+
72+

0 commit comments

Comments
 (0)