Merge pull request #22 from RubenPX/docker-musician

add compatibility with docker
This commit is contained in:
Santiago L 2022-03-17 22:52:35 +01:00 committed by GitHub
commit 2062c0c519
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 0 deletions

14
Dockerfile Normal file
View File

@ -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" ]

View File

@ -1,6 +1,12 @@
# django musician # 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). 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? ## How do I get set up?
1. Install Python and its packet manager (pip) 1. Install Python and its packet manager (pip)

8
docker-compose.yml Normal file
View File

@ -0,0 +1,8 @@
version: "3.9"
services:
web:
build: .
ports:
- "8080:8080"
volumes:
- .:/home