added synchronization with conductor
This commit is contained in:
parent
1cbb281f39
commit
3a5c9dff64
12
Dockerfile
12
Dockerfile
|
@ -1,13 +1,7 @@
|
|||
FROM python:3.7
|
||||
COPY requirements.txt /
|
||||
RUN pip install -r /requirements.txt
|
||||
COPY conductor/ /app/conductor
|
||||
COPY pyexecplugins/ /app/pyexecplugins
|
||||
COPY pyrest.py /app
|
||||
COPY pyexec.py /app
|
||||
COPY config.cfg /app
|
||||
COPY setup.py /app
|
||||
COPY entrypoint.sh /app
|
||||
RUN chmod 755 /app/entrypoint.sh
|
||||
COPY requirements.txt pyrest.py pyexec.py config.cfg entrypoint.sh /app/
|
||||
RUN pip install -r /app/requirements.txt
|
||||
WORKDIR /app
|
||||
ENTRYPOINT ["./entrypoint.sh"]
|
||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
||||
|
|
|
@ -1,4 +1,15 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
export BASE="http://conductorserver:8080/api"
|
||||
|
||||
echo 'Waiting for Conductor ...'
|
||||
|
||||
while [[ "$(curl -s -o /dev/null -L -w ''%{http_code}'' $BASE/health)" != 200 ]]; do
|
||||
echo 'still waiting ...'
|
||||
sleep 5
|
||||
done
|
||||
|
||||
echo 'Starting workers...'
|
||||
|
||||
python3 pyrest.py &
|
||||
python3 pyexec.py
|
||||
|
|
Loading…
Reference in New Issue