Skip to content

Commit

Permalink
Merge pull request #45 from mmig01/main
Browse files Browse the repository at this point in the history
feat: data.json -> Dockerfile 로 이동
  • Loading branch information
mmig01 authored Oct 3, 2024
2 parents 4205165 + dbeced2 commit e7b5c80
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/django_cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
sudo docker cp ./data.json festival_backend_server:/app/data.json
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
CMD ["sh", "-c", "python manage.py loaddata /app/data.json && python manage.py migrate && gunicorn --bind 0.0.0.0:8000 project.wsgi:application"]

0 comments on commit e7b5c80

Please sign in to comment.