Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

Commit

Permalink
Merge pull request #212 from Teichlab/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
mvento authored Oct 28, 2020
2 parents 3e813a8 + ffc84d9 commit b8cdfa0
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 6 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
./in/
./out/
./docker/
.dockerignore
.git
./venv
Expand Down
20 changes: 20 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
image: docker:latest
services:
- docker:dind

variables:
IMAGE_BASENAME: registry.gitlab.com/$CI_PROJECT_PATH:$CI_COMMIT_REF_SLUG
DOCKER_DRIVER: overlay2

stages:
- build

before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com

build-cellphonedb-queries:
stage: build
script:
- docker pull $IMAGE_BASENAME || true
- docker build --cache-from $IMAGE_BASENAME --pull -t $IMAGE_BASENAME .
- docker push $IMAGE_BASENAME
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
ARG PYTHON_VERSION=3.7
FROM python:$PYTHON_VERSION

RUN mkdir /app
RUN mkdir /app /docker
COPY requirements.txt /app
COPY requirements-web.txt /app
WORKDIR /app

RUN pip install -r requirements.txt
RUN pip install -r requirements-web.txt
COPY . /app

CMD python -m unittest
COPY ./docker /docker
RUN mkdir -p /var/log/uwsgi
RUN touch /var/log/uwsgi/cellphonedb.log
CMD ["/docker/run-system.sh"]
3 changes: 1 addition & 2 deletions cellphonedb.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ master = true
processes = 4


socket = /tmp/cellphonedb.sock
socket = 0.0.0.0:5000
chmod-socket = 660
vacuum = true

die-on-term = true

logto = /var/log/uwsgi/%n.log
stats = /tmp/stats.socket
3 changes: 3 additions & 0 deletions docker/run-system.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

exec uwsgi --ini cellphonedb.ini --log-master
Empty file removed out/.gitkeep
Empty file.
1 change: 1 addition & 0 deletions requirements-web.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uWSGI>=2.0,<2.0.99

0 comments on commit b8cdfa0

Please sign in to comment.