Last active
November 7, 2016 20:06
-
-
Save banjocat/9cc97249335de05bd1359d950f309e60 to your computer and use it in GitHub Desktop.
uswgi docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
uwsgi: | |
build: . | |
ports: | |
- "8000:9090" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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