From 5e7ddc90361908b35eddf56076428ec079b7e48b Mon Sep 17 00:00:00 2001 From: KIWONY Date: Mon, 18 Jul 2022 19:11:07 +0900 Subject: [PATCH] =?UTF-8?q?modify:dockerfile=EC=88=98=EC=A0=95=20=EB=B0=8F?= =?UTF-8?q?=20=EB=B0=B0=ED=8F=AC=EC=98=A4=EB=A5=98=20=ED=95=B4=EA=B2=B0(#4?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf/nginx.conf | 1 + docker-compose.yml | 2 -- dockerfile | 6 +++++- 3 files changed, 6 insertions(+), 3 deletions(-) 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 +