Skip to content

Commit

Permalink
updated deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mizanmahi committed Sep 26, 2024
1 parent 1c4f5dd commit 494c827
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ node_modules
.git
npm-debug.log
Dockerfile
.dockerignore
.dockerignore
7 changes: 6 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ jobs:
sudo docker rm nextblog
fi
# creating env file from secret
cd /homes/${{secrets.EC2_USER_NAME}}
echo ${{secrets.APP_ENVS}} > .env
cat .env
# Run the container
echo "Starting a new container..."
sudo docker run -d --name nextblog -p 9000:5000 ${{ secrets.DOCKERHUB_USER_NAME }}/nextblog:2.0
sudo docker run -d --name nextblog --env-file .env -p 9000:5000 ${{ secrets.DOCKERHUB_USER_NAME }}/nextblog:2.0

0 comments on commit 494c827

Please sign in to comment.