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:
@ -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"]
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user