From ca3a8c4639eac93aee0609555743c8d5fe69aea5 Mon Sep 17 00:00:00 2001 From: RubenPX Date: Thu, 17 Mar 2022 01:36:46 +0100 Subject: [PATCH 1/3] add docker files --- docker-compose.yml | 8 ++++++++ dockerfile | 14 ++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 docker-compose.yml create mode 100644 dockerfile diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..0d05dd6 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,8 @@ +version: "3.9" +services: + web: + build: . + ports: + - "8080:8080" + volumes: + - .:/home \ No newline at end of file diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..6f51729 --- /dev/null +++ b/dockerfile @@ -0,0 +1,14 @@ +FROM python + +WORKDIR /home + +RUN python3 -m pip install --upgrade pip +RUN pip install wheel + +COPY . . +RUN pip install -r requirements.txt +RUN python manage.py migrate + +EXPOSE 8080 + +ENTRYPOINT [ "python", "manage.py", "runserver", "0.0.0.0:8080" ] \ No newline at end of file From 1e3a91939055a273f5f3eb9570c517c1a8146055 Mon Sep 17 00:00:00 2001 From: Santiago Lamora Date: Thu, 17 Mar 2022 22:49:46 +0100 Subject: [PATCH 2/3] Rename dockerfile -> Dockerfile *nix filesystem is case sensitive --- dockerfile => Dockerfile | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename dockerfile => Dockerfile (100%) diff --git a/dockerfile b/Dockerfile similarity index 100% rename from dockerfile rename to Dockerfile From fc55c33c90d62012971754f351f42faf23d271ba Mon Sep 17 00:00:00 2001 From: Santiago Lamora Date: Thu, 17 Mar 2022 22:52:05 +0100 Subject: [PATCH 3/3] Add reference to docker-compose (quickstart) --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 8bc4b11..55e1848 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,12 @@ # django musician Python code is written following [PEP 8](https://www.python.org/dev/peps/pep-0008/) sytle guide and it is based on [Django framework](https://djangoproject.com). +## Quickstart development +Start development environment based on docker compose by running: +```bash +docker-compose up +``` + ## How do I get set up? 1. Install Python and its packet manager (pip)