Skip to content

Commit

Permalink
update cd.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelreit committed Aug 9, 2024
1 parent 3587ca7 commit 6e4126b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,9 @@ jobs:
host: ${{ env.SSH_HOST }}
username: ${{ env.SSH_USER }}
key: ${{ env.SSH_PRIVATE_KEY }}
envs: |
DB_USER_NAME=${{ env.DB_USER_NAME }}
DB_USER_PASSWORD=${{ env.DB_USER_PASSWORD }}
script: |
sed -i 's/DB_USER_NAME/${{ env.DB_USER_NAME }}/g' ~/docker-compose.yml
sed -i 's/DB_USER_PASSWORD/${{ env.DB_USER_PASSWORD }}/g' ~/docker-compose.yml
docker compose down
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
docker compose up -d
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ services:
environment:
MYSQL_ROOT_PASSWORD: password # Set the root password for MySQL
MYSQL_DATABASE: ApiDemo # Create a database named 'ApiDemo'
MYSQL_USER: ${DB_USER_NAME} # Create a user with the specified username
MYSQL_PASSWORD: ${DB_USER_PASSWORD} # Set the password for the user
MYSQL_USER: DB_USER_NAME # Create a user with the specified username
MYSQL_PASSWORD: DB_USER_PASSWORD # Set the password for the user
volumes:
- db_data:/var/lib/mysql # Persist MySQL data
- ./src/main/resources/db/migration/V0_9_0__initial_db_creation.sql:/docker-entrypoint-initdb.d/init.sql # Mount the SQL script
Expand Down

0 comments on commit 6e4126b

Please sign in to comment.