diff --git a/conf/nginx.conf b/conf/nginx.conf index 20fa67a..bb4f692 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,4 +1,5 @@ +# 도커에서 같은 네트워크 상의 컨테이너와 통신하는 방법 upstream web { server web:8000; } diff --git a/docker-compose.yml b/docker-compose.yml index 9a30e52..6dfb79d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,9 +9,7 @@ services: - bash - -c - | - python manage.py wait_for_db -t 120 python manage.py migrate - echo yes | python manage.py collectstatic gunicorn ideaconcert.wsgi:application --bind 0.0.0.0:8000 stdin_open: true ports: diff --git a/dockerfile b/dockerfile index 3d6b76e..b939517 100644 --- a/dockerfile +++ b/dockerfile @@ -1,13 +1,17 @@ + FROM python:3.9.0 ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONUNBUFFERED=1 + +COPY . /home/ideaconcert + WORKDIR /home/ideaconcert RUN pip install --upgrade pip RUN pip install -r requirements.txt -COPY . /home/ideaconcert +