Skip to content

Instantly share code, notes, and snippets.

@checkaayush
Created March 30, 2018 15:12
Show Gist options
  • Save checkaayush/2f8e183aefe7c54db4183798e882c2e9 to your computer and use it in GitHub Desktop.
Save checkaayush/2f8e183aefe7c54db4183798e882c2e9 to your computer and use it in GitHub Desktop.
Dockerfile for Python Hug Based Applications served using gunicorn
FROM python:3.6-slim
LABEL maintainer="Aayush Sarva" email="[email protected]"
WORKDIR /usr/src/app
COPY ./requirements.txt /usr/src/app
RUN pip install --no-cache-dir -r requirements.txt
COPY . /usr/src/app
EXPOSE 5000
CMD gunicorn -b :5000 --timeout 300 <path_to_hug_api>:__hug_wsgi__
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment