Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#base image

From python:3.7

#working directory

WORKDIR /app

#code copy

COPY . .

#install libraries

RUN pip install -r requirements.txt

#migrate

RUN python cool_counters/manage.py migrate

#cmd

CMD ["python","cool_counters/manage.py","runserver","0.0.0.0:8000"]


11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Simple Django App
This is a simple, minimal Django app intended to help understand the main aspects of working with Django.
This is a simple, minimal Django app intended to help you understand the main aspects of working with Django.

## Usage Instructions
Clone this repository e.g.
Expand All @@ -25,3 +25,12 @@ python manage.py runserver
```

Navigate to to http://127.0.0.1:8000

To create the docker image, run:

docker build -t counter-app .

To run the docker image, run:

docker run -d -p 8000:8000 counter-app:latest

2 changes: 1 addition & 1 deletion cool_counters/cool_counters/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []
ALLOWED_HOSTS = ["*"]


# Application definition
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
django