Last active
August 15, 2017 15:29
-
-
Save Parassharmaa/8e1420ff4d5b7f875bec7b5284cc5e69 to your computer and use it in GitHub Desktop.
Docker : Python Flask Deployment
This file contains hidden or 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
| docker build -t <IMAGE NAME> . | |
| docker run -e "ENV=DEV" -p 5000:5000 <IMAGE NAME> | |
| docker run -d -p 80:9090 <IMAGE NAME> |
This file contains hidden or 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
| <Container Name> : | |
| build: . | |
| ports: | |
| - "80:9090" | |
| environment: | |
| ENV : PROD | |
| volumes: | |
| - ./app:/app |
This file contains hidden or 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:3.4 | |
| RUN pip install Flask==0.10.1 uWSGI==2.0.8 | |
| WORKDIR /app | |
| COPY app /app | |
| CMD ["uwsgi", "--http", "0.0.0.0:9090", "--wsgi-file", "/app/server.py", \ | |
| "--callable", "app", "--stats", "0.0.0.0:9191"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment