Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Fractalis
fractalis
Commits
b8768c68
Commit
b8768c68
authored
Nov 21, 2017
by
Sascha Herzinger
Browse files
adding docker-compose for multi-service setup
parent
992dcfe7
Pipeline
#2637
failed with stage
in 2 minutes and 41 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Dockerfile
→
Dockerfile
-web
View file @
b8768c68
...
...
@@ -10,14 +10,8 @@ RUN apt-get update \
python3.5-dev \
python3-pip \
python3-setuptools \
rabbitmq-server
\
redis-server
\
r-bioc-limma
RUN pip3 install wheel
RUN pip3 install -e /app --default-timeout 180
RUN
/etc/init.d/redis-server start
RUN
/etc/init.d/rabbitmq-server start
RUN
celery worker
-A
fractalis:celery
-D
-l
info
EXPOSE
5000
CMD ["python3", "fractalis/__init__.py"]
Dockerfile-worker
0 → 100644
View file @
b8768c68
FROM buildpack-deps:stretch
WORKDIR /app
COPY . /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
r-base \
python3.5 \
python3.5-dev \
python3-pip \
python3-setuptools \
r-bioc-limma
RUN pip3 install wheel
RUN pip3 install -e /app --default-timeout 180
CMD ["celery", "worker", "-A", "fractalis:celery"]
docker-compose.yml
0 → 100644
View file @
b8768c68
version
:
'
3'
services
:
web
:
build
:
context
:
.
dockerfile
:
Dockerfile-web
environment
:
-
FRACTALIS_CONFIG=${FRACTALIS_CONFIG}
-
REDIS_HOST=redis
-
RABBITMQ_HOST=rabbitmq
ports
:
-
'
5000:5000'
worker
:
build
:
context
:
.
dockerfile
:
Dockerfile-worker
environment
:
-
FRACTALIS_CONFIG=${FRACTALIS_CONFIG}
-
REDIS_HOST=redis
-
RABBITMQ_HOST=rabbitmq
redis
:
image
:
'
redis:alpine'
rabbitmq
:
image
:
'
rabbitmq:alpine'
fractalis/config.py
View file @
b8768c68
...
...
@@ -8,7 +8,7 @@ from datetime import timedelta
SECRET_KEY
=
'OVERWRITE ME IN PRODUCTION!!!'
DEBUG
=
False
TESTING
=
False
REDIS_HOST
=
'127.0.0.1'
REDIS_HOST
=
os
.
environ
.
get
(
'REDIS_HOST'
)
or
'127.0.0.1'
REDIS_PORT
=
'6379'
SESSION_COOKIE_HTTPONLY
=
True
SESSION_COOKIE_SECURE
=
False
...
...
@@ -16,7 +16,8 @@ SESSION_REFRESH_EACH_REQUEST = True
PERMANENT_SESSION_LIFETIME
=
timedelta
(
days
=
1
)
# Celery
BROKER_URL
=
'amqp://'
RABBITMQ_HOST
=
os
.
environ
.
get
(
'RABBITMQ_HOST'
)
or
'127.0.0.1'
BROKER_URL
=
'amqp://guest:guest@{}:5672//'
.
format
(
RABBITMQ_HOST
)
CELERY_RESULT_BACKEND
=
'redis://{}:{}'
.
format
(
REDIS_HOST
,
REDIS_PORT
)
CELERYD_TASK_SOFT_TIME_LIMIT
=
60
*
20
CELERYD_TASK_TIME_LIMIT
=
60
*
30
...
...
setup.py
View file @
b8768c68
...
...
@@ -24,7 +24,8 @@ setup(
'requests==2.18.4'
,
'PyYAML==3.12'
,
'pycryptodomex==3.4.7'
,
'rpy2==2.9.0'
'rpy2==2.9.0'
,
'flake8==3.5.0'
],
setup_requires
=
[
'pytest-runner==2.12.1'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment