Skip to content

Commit

Permalink
Merge pull request #19 from l0rb/master
Browse files Browse the repository at this point in the history
add Dockerfile
  • Loading branch information
interrogator committed Nov 27, 2019
2 parents a3e7b65 + a9ac8a8 commit d851a90
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
26 changes: 26 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM python:3.7-buster

WORKDIR /

RUN \
git clone https://github.com/interrogator/buzz.git buzz && \
cd buzz && \
pip install -r requirements.txt

RUN \
git clone https://github.com/l0rb/buzzword.git buzzword && \
cd buzzword && \
pip install -r requirements.txt

RUN pip install dash_bootstrap_components

WORKDIR /buzzword
RUN \
cp .env.example .env && \
cp corpora.json.example corpora.json && \
sed -i 's!dtrt/do-the-right-thing-parsed!/buzz/dtrt/do-the-right-thing-parsed!' corpora.json && \
sed -i '0,/disabled/! s/"disabled": false/"disabled": true/' corpora.json

RUN python manage.py migrate

CMD python manage.py runserver 0.0.0.0:8000
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,11 @@ To set things up more more permanently, either modify the directory created with
buzzword --debug
# or python -m buzzword --debug
```

## Run from Dockerfile

```bash
docker build . -t name/tag
docker run -it -p 8001:8000 name/tag
```
buzzword is now available at http://localhost:8001

0 comments on commit d851a90

Please sign in to comment.