Skip to content

Instantly share code, notes, and snippets.

@banjocat
Last active November 7, 2016 20:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save banjocat/9cc97249335de05bd1359d950f309e60 to your computer and use it in GitHub Desktop.
Save banjocat/9cc97249335de05bd1359d950f309e60 to your computer and use it in GitHub Desktop.
uswgi docker
version: '2'
services:
uwsgi:
build: .
ports:
- "8000:9090"
FROM python:2-alpine
RUN pip install --upgrade pip
RUN echo "http://nl.alpinelinux.org/alpine/v3.4/main" > /etc/apk/repositories
RUN apk update && apk add \
gcc \
musl-dev \
linux-headers
RUN pip install uwsgi
COPY ./helloworld.py .
CMD uwsgi --http :9090 --wsgi-file helloworld.py
def application(env, start_response):
start_response('200 OK', [('Content-Type','text/html')])
return [b"Hello World"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment