Created
September 23, 2019 04:15
-
-
Save Kamori/aed23e820af121b0c70f10947e12a16d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| diff --git a/Dockerfile b/Dockerfile | |
| index 2a5e815..5ae3651 100644 | |
| --- a/Dockerfile | |
| +++ b/Dockerfile | |
| @@ -1,8 +1,9 @@ | |
| FROM python:3.7 | |
| +COPY . /app | |
| + | |
| WORKDIR /app | |
| -COPY djangodocker djangodocker | |
| -COPY manage.py requirements.txt /app/ | |
| + | |
| RUN pip install -r requirements.txt && \ | |
| python manage.py collectstatic --noinput | |
| diff --git a/docker-compose.yml b/docker-compose.yml | |
| index e361b4e..08a7813 100644 | |
| --- a/docker-compose.yml | |
| +++ b/docker-compose.yml | |
| @@ -2,27 +2,7 @@ version: "3.2" | |
| services: | |
| app: | |
| build: . | |
| - networks: | |
| - - main # Add the container to the network "main" | |
| - depends_on: | |
| - - db | |
| - db: | |
| - image: mysql | |
| - environment: | |
| - MYSQL_DATABASE: djangodocker_db | |
| - MYSQL_ROOT_PASSWORD: root | |
| - networks: | |
| - - main # Add the container to the network "main" | |
| - nginx: | |
| - image: nginx | |
| volumes: | |
| - - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro | |
| - - ./static:/usr/share/nginx/djangodocker/static | |
| + - .:/app | |
| ports: | |
| - "8000:8000" | |
| - networks: | |
| - - main # Add the container to the network "main" | |
| - depends_on: | |
| - - app | |
| -networks: | |
| - main: | |
| \ No newline at end of file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment