adding in improvements from when we ran the birthday party app. Mostly fixed the Dockerfiles so they use Alpine for the base images. That required re-working the Java worker Docker file. Removed links from compose file. cleaned up a few things like a tab instead of a space in app.py

This commit is contained in:
Mano Marks
2016-04-25 11:28:21 -07:00
parent 10a3a3b68a
commit 261eb03102
6 changed files with 18 additions and 20 deletions

View File

@ -1,5 +1,5 @@
# Using official python runtime base image
FROM python:2.7
FROM python:2.7-alpine
# Set the application directory
WORKDIR /app
@ -11,8 +11,8 @@ RUN pip install -r requirements.txt
# Copy our code from the current folder to /app inside the container
ADD . /app
# Make port 5000 available for links and/or publish
EXPOSE 80
# Make port 80 available for links and/or publish
EXPOSE 80
# Define our command to be run when launching the container
CMD ["python", "app.py"]

View File

@ -36,9 +36,10 @@ def hello():
hostname=hostname,
vote=vote,
))
resp.headers['Cache-Control'] = 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0, max-age=0';
resp.set_cookie('voter_id', voter_id)
return resp
if __name__ == "__main__":
app.run(host='0.0.0.0', port=80, debug=True)
app.run(host='0.0.0.0', port=80, debug=True)