-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a base docker image for c2cwsgiutils
- Loading branch information
Patrick Valsecchi
committed
Jun 9, 2017
1 parent
1ec56e2
commit 5f1b567
Showing
17 changed files
with
76 additions
and
50 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,8 @@ | ||
* | ||
!c2cwsgiutils | ||
!c2cwsgiutils_* | ||
!LICENSE.txt | ||
!README.md | ||
!rel_requirements.txt | ||
!setup.py | ||
!setup.cfg |
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,21 @@ | ||
FROM python:3.6 | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y libpq-dev libgeos-dev libproj-dev libjpeg-dev postgresql-client graphviz: && \ | ||
apt-get clean && \ | ||
rm -r /var/lib/apt/lists/* | ||
COPY rel_requirements.txt /c2cwsgiutils/ | ||
RUN pip install --no-cache-dir -r /c2cwsgiutils/rel_requirements.txt | ||
|
||
COPY . /c2cwsgiutils/ | ||
RUN flake8 /c2cwsgiutils && \ | ||
pip install --no-cache-dir -e /c2cwsgiutils | ||
|
||
ENV LOG_TYPE=console \ | ||
LOG_HOST=localhost \ | ||
LOG_PORT=514 \ | ||
SQL_LOG_LEVEL=WARN \ | ||
OTHER_LOG_LEVEL=WARN \ | ||
DEVELOPMENT=0 | ||
|
||
CMD ["c2cwsgiutils_run"] |
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,24 +1,16 @@ | ||
FROM python:3.5 | ||
FROM camptocamp/c2cwsgiutils:latest | ||
MAINTAINER Camptocamp "[email protected]" | ||
|
||
# Doing things in two steps to avoid needing to re-install everything when we do a rebuild | ||
# after changing code | ||
|
||
# Step #1 copy only the stuff needed to install the dependencies and run the script | ||
WORKDIR /app | ||
COPY requirements.txt rel_requirements.txt /app/ | ||
RUN pip install -r requirements.txt | ||
|
||
EXPOSE 80 | ||
|
||
ENV LOG_TYPE console | ||
ENV LOG_HOST localhost | ||
ENV LOG_PORT 514 | ||
ENV SQL_LOG_LEVEL WARN | ||
ENV OTHER_LOG_LEVEL WARN | ||
ENV DEVELOPMENT 0 | ||
ENV SQLALCHEMY_URL postgresql://www-data:www-data@db:5432/test | ||
ENV SQLALCHEMY_URL_SLAVE postgresql://www-data:www-data@db_slave:5432/test | ||
ENV SQLALCHEMY_URL=postgresql://www-data:www-data@db:5432/test \ | ||
SQLALCHEMY_URL_SLAVE=postgresql://www-data:www-data@db_slave:5432/test | ||
|
||
# Step #2 copy the rest of the files (watch for the .dockerignore) | ||
COPY . /app | ||
|
@@ -29,7 +21,5 @@ ARG GIT_HASH | |
RUN python ./setup.py install && \ | ||
./models_graph.py > models.dot && \ | ||
./models_graph.py Hello > models_hello.dot && \ | ||
./c2cwsgiutils_genversion.py $GIT_TAG $GIT_HASH && \ | ||
flake8 c2cwsgiutils c2cwsgiutils_app | ||
|
||
CMD ["./c2cwsgiutils_run"] | ||
c2cwsgiutils_genversion.py $GIT_TAG $GIT_HASH && \ | ||
flake8 c2cwsgiutils_app |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
[flake8] | ||
ignore = E121,E123,E126,E226,E24,E704 | ||
max-line-length = 110 |
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 was deleted.
Oops, something went wrong.
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 @@ | ||
[flake8] | ||
ignore = E121,E123,E126,E226,E24,E704 | ||
max-line-length = 110 |
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,3 +1,2 @@ | ||
flake8==3.3.0 | ||
junit2html | ||
twine |
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