Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: data.json -> Dockerfile 로 이동 #45

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"]
Loading