Skip to content

Commit

Permalink
Update: docker.yaml.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sunwupark committed Nov 2, 2023
1 parent e070403 commit 03147a9
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,25 @@ jobs:
source: ./docker-compose.yaml
target: /home/ubuntu/

- name: Create and Copy .env File to EC2
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ubuntu
key: ${{ secrets.KEY }}
script: |
# Create .env file
echo "DB_URL=${{ secrets.DB_URL }}" > ~/.env
echo "DB_USERNAME=${{ secrets.DB_USERNAME }}" >> ~/.env
echo "DB_PASS=${{ secrets.DB_PASS }}" >> ~/.env
echo "JWT_SECRET=${{ secrets.JWT_SECRET }}" >> ~/.env
echo "KAKAO_CLIENT=${{ secrets.KAKAO_CLIENT }}" >> ~/.env
echo "KAKAO_SECRET=${{ secrets.KAKAO_SECRET }}" >> ~/.env
# Copy .env file to the project directory
cp ~/.env /home/ubuntu/.env
## docker compose up
- name: Docker Compose on EC2
Expand Down

0 comments on commit 03147a9

Please sign in to comment.