diff --git a/.github/workflows/django_cicd.yml b/.github/workflows/django_cicd.yml index 0368211..4ee7a51 100644 --- a/.github/workflows/django_cicd.yml +++ b/.github/workflows/django_cicd.yml @@ -77,4 +77,4 @@ jobs: sudo docker exec festival_backend_server python manage.py collectstatic --noinput # 7. SQLite 데이터 복원 (loaddata) - sudo docker cp ./data.json festival_backend_server:/app/data.json && sudo docker exec festival_backend_server python manage.py loaddata /app/data.json \ No newline at end of file + sudo docker cp ./data.json festival_backend_server:/app/data.json \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 47a3b7b..aad5a96 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,4 +18,4 @@ COPY . . RUN pip install gunicorn # Django 마이그레이션 실행 후 Gunicorn으로 서버 시작 -CMD ["sh", "-c", "python manage.py migrate && gunicorn --bind 0.0.0.0:8000 project.wsgi:application"] \ No newline at end of file +CMD ["sh", "-c", "python manage.py loaddata /app/data.json && python manage.py migrate && gunicorn --bind 0.0.0.0:8000 project.wsgi:application"] \ No newline at end of file