Skip to content

Commit 37624a4

Browse files
committed
Add a dockerfile and makefile for development
Currently, installing the ticker app changes the system/user python package list. Instead, allow using a docker image for development. Add a Makefile with two common commands for convenience.
1 parent 1c5dd97 commit 37624a4

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM python:3
2+
3+
WORKDIR /ticker/
4+
COPY . .
5+
RUN pip install -r requirements.txt
6+
RUN python manage.py migrate
7+
8+
9+
EXPOSE 8000
10+
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
default: build
2+
$(MAKE) run
3+
4+
run:
5+
docker run --rm -p 8000:8000 --name jticker -v "$PWD:/ticker/" ticker
6+
7+
build:
8+
docker build -t ticker .
9+
10+
11+
.PHONY: default build run

0 commit comments

Comments
 (0)