Skip to content

Commit

Permalink
Merge pull request #23 from LINE-NOW/JongbeomLee623-patch-2
Browse files Browse the repository at this point in the history
Update django-deploy.yml
  • Loading branch information
JongbeomLee623 authored Sep 22, 2024
2 parents 6827bcc + d6edd2b commit 82f7dbb
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/django-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,22 @@ jobs:
CI:
runs-on: ubuntu-latest

services:
db:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: ${{ secrets.DATABASE_USER_PASSWORD }}
MYSQL_DATABASE: ${{ secrets.DATABASE_NAME }}
MYSQL_USER: ${{ secrets.DATABASE_USER }}
MYSQL_PASSWORD: ${{ secrets.DATABASE_USER_PASSWORD }}
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping --silent"
--health-interval=10s
--health-timeout=5s
--health-retries=3
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -24,12 +40,8 @@ jobs:
echo "DATABASE_NAME=${{ secrets.DATABASE_NAME }}" >> .env
echo "DATABASE_USER=${{ secrets.DATABASE_USER }}" >> .env
echo "DATABASE_USER_PASSWORD=${{ secrets.DATABASE_USER_PASSWORD }}" >> .env
echo "DATABASE_HOST=${{ secrets.DATABASE_HOST }}" >> .env
echo "DATABASE_PORT=${{ secrets.DATABASE_PORT }}" >> .env
echo "DB_HOST=${{ secrets.DB_HOST }}" >> .env
echo "DB_NAME=${{ secrets.DB_NAME }}" >> .env
echo "DB_USER=${{ secrets.DB_USER }}" >> .env
echo "DB_PASSWORD=${{ secrets.DB_PASSWORD }}" >> .env
echo "DATABASE_HOST=127.0.0.1" >> .env # DB는 로컬에서 실행됨
echo "DATABASE_PORT=3306" >> .env
cat .env
- name: Set up Python 3.12
Expand Down

0 comments on commit 82f7dbb

Please sign in to comment.