Created
March 15, 2015 11:46
-
-
Save sgykfjsm/914bbe7292f51b530bc8 to your computer and use it in GitHub Desktop.
Beanstalkの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
#!/usr/bin/env python | |
# vim:fenc=utf-8 | |
from wsgiref.simple_server import make_server, WSGIServer | |
from SocketServer import ThreadingMixIn | |
def application(environ, start_response): | |
start_response('200 OK', [('Content-type', 'text/html')]) | |
return ['ok'] | |
class ThreadingWSGIServer(ThreadingMixIn, WSGIServer): | |
pass | |
if __name__ == '__main__': | |
httpd = make_server('', 8000, application, ThreadingWSGIServer) | |
httpd.serve_forever() |
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 dockerfile/python | |
ADD application.py /usr/local/share/application.py | |
EXPOSE 8000 | |
ENTRYPOINT ["python", "/usr/local/share/application.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
{ | |
"AWSEBDockerrunVersion": "1", | |
"Logging": "/var/log/dummy-application", | |
"Image": { | |
"Update": "false" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
デプロイ用のzipは以下の様なコマンドで作成し、解凍後に親ディレクトリが出来ないようにしなければならない。
.ebextensionsについては ここを参照。