-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into new_branch
- Loading branch information
Showing
5 changed files
with
62 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM python:3.8.13 | ||
|
||
# 환경 변수 설정 | ||
ENV HOME=/home/app | ||
ENV APP_HOME=/home/app/web | ||
|
||
|
||
# 애플리케이션 디렉터리 생성 | ||
RUN mkdir -p $APP_HOME | ||
WORKDIR $APP_HOME | ||
|
||
# 파이썬 실행 관련 환경 변수 | ||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
ENV PYTHONUNBUFFERED 1 | ||
|
||
# requirements.txt 복사 및 설치 | ||
COPY ./requirements.txt $APP_HOME/requirements.txt | ||
RUN pip install --no-cache-dir --upgrade pip && \ | ||
pip install --no-cache-dir --upgrade -r requirements.txt | ||
|
||
# .env 파일을 제외하고 모든 파일 복사 | ||
COPY . $APP_HOME | ||
RUN rm -f $APP_HOME/.env | ||
|
||
RUN sed -i 's/\r$//g' $APP_HOME/entrypoint-dev.sh | ||
|
||
RUN chmod +x $APP_HOME/entrypoint-dev.sh | ||
|
||
ENTRYPOINT [ "/home/app/web/entrypoint-dev.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/sh | ||
|
||
|
||
python manage.py makemigrations --settings=cspc_web.settings_dev | ||
python manage.py migrate --no-input --settings=cspc_web.settings_dev | ||
|
||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters