-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #158 from thebrianzeng/docker
Docker and Consul support
- Loading branch information
Showing
11 changed files
with
224 additions
and
57 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# use Docker's provided python image | ||
FROM python:2.7 | ||
MAINTAINER natebrennand <natebrennand@gmail.com> | ||
|
||
# install all packages | ||
COPY ./config/requirements.txt /requirements.txt | ||
RUN pip install -r /requirements.txt | ||
|
||
# add the application directories | ||
ADD ./density /density | ||
WORKDIR /density | ||
|
||
# expose the port and start the server | ||
EXPOSE 6002 | ||
CMD gunicorn density:app -b 0.0.0.0:6002 --log-file /opt/logs/gunicorn.log --log-level debug |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,26 @@ | ||
Flask==0.10.1 | ||
Flask-Mail==0.9.1 | ||
Jinja2==2.7.3 | ||
MarkupSafe==0.23 | ||
Werkzeug==0.9.6 | ||
flake8==2.2.3 | ||
Werkzeug==0.10.1 | ||
argparse==1.2.1 | ||
blinker==1.3 | ||
colorama==0.2.5 | ||
flake8==2.3.0 | ||
gunicorn==19.2.1 | ||
html5lib==0.999 | ||
httplib2==0.9 | ||
itsdangerous==0.24 | ||
mccabe==0.2.1 | ||
pep8==1.5.7 | ||
psycopg2==2.5.4 | ||
mccabe==0.3 | ||
oauth2client==1.4.6 | ||
pep8==1.6.2 | ||
psycopg2==2.6 | ||
pyasn1==0.1.7 | ||
pyasn1-modules==0.0.5 | ||
pyflakes==0.8.1 | ||
python-consul==0.3.10 | ||
requests==2.3.0 | ||
rsa==3.1.4 | ||
six==1.9.0 | ||
urllib3==1.7.1 | ||
wsgiref==0.1.2 | ||
oauth2client==1.4.1 | ||
Flask-Mail==0.9.1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
# http://www.consul.io/docs/commands/index.html | ||
|
||
consul agent \ | ||
-server \ | ||
-bootstrap \ | ||
-client 0.0.0.0 \ | ||
-data-dir ~/consul \ | ||
-ui-dir /usr/share/consul/ui | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
|
||
curl -X PUT -d '5000' http://localhost:8500/v1/kv/density/flask_port | ||
curl -X PUT -d 'TRUE' http://localhost:8500/v1/kv/density/flask_debug | ||
curl -X PUT -d '859795907220-57lf7t8m19a1i3huaogqg546u5efjk8j.apps.googleusercontent.com' http://localhost:8500/v1/kv/density/google_client_id | ||
curl -X PUT -d 'density' http://localhost:8500/v1/kv/density/postgres_database | ||
curl -X PUT -d 'localhost' http://localhost:8500/v1/kv/density/postgres_host | ||
curl -X PUT -d 'adi' http://localhost:8500/v1/kv/density/postgres_password | ||
curl -X PUT -d '5432' http://localhost:8500/v1/kv/density/postgres_port | ||
curl -X PUT -d 'adi' http://localhost:8500/v1/kv/density/postgres_user | ||
curl -X PUT -d 'abc123' http://localhost:8500/v1/kv/density/secret_key |
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
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