updated docker build instructions

This commit is contained in:
dcore94 2022-07-28 18:02:21 +02:00
parent 97cdf10a82
commit 5dbc529445
5 changed files with 43 additions and 0 deletions

10
build-d4science.sh Executable file
View File

@ -0,0 +1,10 @@
#!/usr/bin/env bash
if [ $# -eq 0 ]
then
tag='latest'
else
tag=$1
fi
docker build -t nubisware/nubisware-conductor-worker-py-d4s:$tag -f docker/d4science/Dockerfile .
docker push nubisware/nubisware-conductor-worker-py-d4s:$tag

View File

@ -0,0 +1,8 @@
FROM python:3.7
COPY ./docker/d4science/requirements.txt /app/
RUN pip install -r /app/requirements.txt
COPY conductor/ /app/conductor
COPY pyexecplugins/ /app/pyexecplugins
COPY ./docker/d4science/requirements.txt PyExec.py ./docker/d4science/config.cfg ./docker/d4science/entrypoint.sh /app/
WORKDIR /app
ENTRYPOINT ["/app/entrypoint.sh"]

View File

@ -0,0 +1,9 @@
[common]
loglevel = info
threads = 1
pollrate = 1
[pymail]
server = smtp-relay.d4science.org
protocol = starttls
port = 587

14
docker/d4science/entrypoint.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
export HEALTH=${CONDUCTOR_HEALTH:-http://conductor-server:8080/health}
echo 'Waiting for Conductor at ' $HEALTH '...'
while [[ "$(curl -s -o /dev/null -L -w ''%{http_code}'' $HEALTH)" != 200 ]]; do
echo 'still waiting ...'
sleep 5
done
echo 'Starting default workers with $worker_plugins ...'
python3 PyExec.py $worker_plugins

View File

@ -0,0 +1,2 @@
requests >= 2.19.1