-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
O Dockerfile estava desconsiderando as dependências concretas, definidas no arquivo `requirements.txt` e instalando-as a partir das declarações abstratas do módulo `setup.py`, o que causava falta de determinismo na criação das imagens. Esta mudança corrige o ponto mencionado e faz ainda outras melhorias, como o desligamento do buffer de IO do interpretador Python, definição de usuário do processo e criação de de `docker-compose.yml` de exemplo para execução local.
- Loading branch information
1 parent
28724e1
commit 30c6037
Showing
4 changed files
with
35 additions
and
10 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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
FROM python:3.5.2 | ||
ENV PYTHONUNBUFFERED 1 | ||
|
||
MAINTAINER [email protected] | ||
|
||
|
@@ -9,10 +10,14 @@ COPY production.ini-TEMPLATE /app/config.ini | |
|
||
WORKDIR /app | ||
|
||
RUN pip install --upgrade pip | ||
RUN pip install gunicorn | ||
RUN pip install --upgrade deps/scielojcr-1.3.0-py2.py3-none-any.whl | ||
RUN pip install --upgrade pip && \ | ||
pip install gunicorn && \ | ||
pip install --upgrade deps/scielojcr-1.3.0-py2.py3-none-any.whl && \ | ||
pip install -r requirements.txt && \ | ||
python setup.py install | ||
|
||
ENV ANALYTICS_SETTINGS_FILE=/app/config.ini | ||
|
||
RUN python setup.py install | ||
USER nobody | ||
|
||
CMD ["gunicorn", "--paste", "/app/config.ini", "-b", "0.0.0.0", "--forwarded-allow-ips", "*"] |
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,4 +1,5 @@ | ||
FROM python:3.5.2 | ||
ENV PYTHONUNBUFFERED 1 | ||
|
||
MAINTAINER [email protected] | ||
|
||
|
@@ -9,10 +10,14 @@ COPY development.ini-TEMPLATE /app/config.ini | |
|
||
WORKDIR /app | ||
|
||
RUN pip install --upgrade pip | ||
RUN pip install gunicorn | ||
RUN pip install --upgrade deps/scielojcr-1.3.0-py2.py3-none-any.whl | ||
RUN pip install --upgrade pip && \ | ||
pip install gunicorn && \ | ||
pip install --upgrade deps/scielojcr-1.3.0-py2.py3-none-any.whl && \ | ||
pip install -r requirements.txt && \ | ||
python setup.py install | ||
|
||
ENV ANALYTICS_SETTINGS_FILE=/app/config.ini | ||
|
||
RUN python setup.py develop | ||
USER nobody | ||
|
||
CMD ["gunicorn", "--paste", "/app/config.ini", "-b", "0.0.0.0", "--forwarded-allow-ips", "*"] |
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,16 @@ | ||
version: '2' | ||
|
||
services: | ||
memcached: | ||
image: memcached | ||
restart: always | ||
webapp: | ||
build: | ||
context: . | ||
dockerfile: ./Dockerfile | ||
user: nobody | ||
restart: always | ||
depends_on: | ||
- memcached | ||
ports: | ||
- "8000:8000" |
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,4 +1,4 @@ | ||
requests==2.11.1 | ||
requests==2.19.1 | ||
cython==0.22 | ||
thriftpy==0.3.1 | ||
pyramid==1.5.7 | ||
|
@@ -16,4 +16,3 @@ publicationstatsapi==1.2.0 | |
articlemetaapi==1.14.19 | ||
altmetric==1.0.0 | ||
-e git+https://github.com/scieloorg/[email protected]#egg=thriftpywrap | ||
-e git+https://github.com/scieloorg/[email protected]#egg=analytics |