Skip to content

Commit

Permalink
expose ports, fix response
Browse files Browse the repository at this point in the history
  • Loading branch information
abby-fuller committed Feb 9, 2017
1 parent 738254b commit 9b8d15f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 3 additions & 1 deletion api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ RUN apt-get update -y && apt-get install -y python-pip python-dev build-essentia
COPY . /app
WORKDIR /app
RUN pip install -r requirements.txt

EXPOSE 8000

ENTRYPOINT ["python"]
CMD ["app.py"]
EXPOSE 8000
2 changes: 1 addition & 1 deletion api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@app.route('/api')
def hello_world():
return 'hi! i\'m ALSO served via Python + Flask. i\'m a second web endpoint.'
return ('hi! i\'m ALSO served via Python + Flask. i\'m a second web endpoint.')

if __name__ == '__main__':
app.run(port='8000',host='0.0.0.0')
3 changes: 3 additions & 0 deletions web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ COPY . /app
WORKDIR /app
RUN pip install -r requirements.txt
ENTRYPOINT ["python"]

EXPOSE 3000

CMD ["app.py"]
4 changes: 2 additions & 2 deletions web/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@app.route('/web')
def hello_world():
return 'hi! i\'m served via Python + Flask. i\m a web endpoint.'
return ('hi! i\'m served via Python + Flask. i\'m a web endpoint.')

if __name__ == '__main__':
app.run(port='5000',host='0.0.0.0')
app.run(port='3000',host='0.0.0.0')

0 comments on commit 9b8d15f

Please sign in to comment.