-
Notifications
You must be signed in to change notification settings - Fork 0
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 #69 from izrik/docker
Docker
- Loading branch information
Showing
8 changed files
with
131 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
**/*.py[cod] | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# PyCharm | ||
.idea | ||
|
||
# virtualenv | ||
bin | ||
include | ||
Scripts | ||
.venv | ||
|
||
# tudor test things | ||
tudor_tasks.p | ||
test.db | ||
set_env.sh | ||
.tudor | ||
set-env.sh | ||
|
||
# scratch files | ||
_scratch* | ||
|
||
# coveralls | ||
.coveralls.yml |
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,33 @@ | ||
FROM python:2.7 | ||
|
||
ENV PLANTAGENET_VERSION=0.1 | ||
LABEL \ | ||
Name="plantagenet" \ | ||
Version="$PLANTAGENET_VERSION" \ | ||
Summary="A Python blogging system." \ | ||
Description="A Python blogging system." \ | ||
maintaner="izrik <izrik@izrikrackspace.com>" | ||
|
||
RUN mkdir -p /opt/plantagenet | ||
|
||
WORKDIR /opt/plantagenet | ||
|
||
COPY plantagenet.py \ | ||
LICENSE \ | ||
README.md \ | ||
requirements.txt \ | ||
docker_start.sh \ | ||
./ | ||
|
||
COPY static static | ||
COPY templates templates | ||
|
||
RUN pip install -r requirements.txt | ||
RUN pip install gunicorn==19.8.1 | ||
RUN pip install MySQL-python==1.2.5 | ||
|
||
EXPOSE 8080 | ||
ENV PLANTAGENET_PORT=8080 \ | ||
PLANTAGENET_HOST=0.0.0.0 | ||
|
||
CMD ["/opt/plantagenet/docker_start.sh"] |
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,4 @@ | ||
#!/bin/sh | ||
|
||
python /opt/plantagenet/plantagenet.py --create-db | ||
gunicorn -b $PLANTAGENET_HOST:$PLANTAGENET_PORT plantagenet:app |
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