Skip to content

Instantly share code, notes, and snippets.

@rochacon
Created September 3, 2014 19:07
Show Gist options
  • Save rochacon/dd57746053cdbe9aed23 to your computer and use it in GitHub Desktop.
Save rochacon/dd57746053cdbe9aed23 to your computer and use it in GitHub Desktop.
AWS Beanstalk Python web app on Docker
{
"AWSEBDockerrunVersion": "1",
"Image": {
"Update": "false"
},
"Ports": [
{"ContainerPort": "8080"}
],
}
FROM python:2
RUN apt-get update -y && apt-get install -y wget && apt-get clean
RUN wget -qO/usr/local/bin/forego https://godist.herokuapp.com/projects/ddollar/forego/releases/0.11.0/linux-amd64/forego && chmod +x /usr/local/bin/forego
RUN pip install waitress
ADD . /app
RUN pip install -r /app/requirements.txt
WORKDIR /app
EXPOSE 8080
USER nobody
ENTRYPOINT ["/usr/local/bin/forego"]
CMD ["start", "web"]
web: waitress-serve --port 8080 app:app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment