-
Notifications
You must be signed in to change notification settings - Fork 101
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 #50 from NdagiStanley/master
Add docker files and update README
- Loading branch information
Showing
5 changed files
with
132 additions
and
0 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,70 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.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 | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*,cover | ||
.hypothesis/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
#Ipython Notebook | ||
.ipynb_checkpoints | ||
|
||
.env | ||
venv/ | ||
.python-version | ||
cleanup.sh | ||
*_example.py | ||
.idea | ||
README.txt |
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,40 @@ | ||
FROM ubuntu:xenial | ||
ENV PYTHON_VERSIONS='python2.6 python2.7 python3.4 python3.5 python3.6' \ | ||
OAI_SPEC_URL="https://raw.githubusercontent.com/sendgrid/sendgrid-oai/master/oai_stoplight.json" | ||
|
||
# install testing versions of python, including old versions, from deadsnakes | ||
RUN set -x \ | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends software-properties-common \ | ||
&& apt-add-repository -y ppa:fkrull/deadsnakes \ | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends $PYTHON_VERSIONS \ | ||
git \ | ||
curl \ | ||
&& apt-get purge -y --auto-remove software-properties-common \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR /root | ||
|
||
# install Prism | ||
ADD https://raw.githubusercontent.com/stoplightio/prism/master/install.sh install.sh | ||
RUN chmod +x ./install.sh && \ | ||
./install.sh && \ | ||
rm ./install.sh | ||
|
||
# install pip, tox | ||
ADD https://bootstrap.pypa.io/get-pip.py get-pip.py | ||
RUN python2.7 get-pip.py && \ | ||
pip install tox && \ | ||
rm get-pip.py | ||
|
||
# set up default sendgrid env | ||
WORKDIR /root/sources | ||
RUN git clone https://github.com/sendgrid/sendgrid-python.git && \ | ||
git clone https://github.com/sendgrid/python-http-client.git | ||
WORKDIR /root | ||
RUN ln -s /root/sources/sendgrid-python/sendgrid && \ | ||
ln -s /root/sources/python-http-client/python_http_client | ||
|
||
COPY . . | ||
CMD sh run.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
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,6 @@ | ||
version: '3' | ||
services: | ||
app: | ||
build: . | ||
volumes: | ||
- .:/root |
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,3 @@ | ||
#!/bin/sh | ||
|
||
python2.7 -m unittest discover -v |