Commit 93eddbae authored by Felipe Pina's avatar Felipe Pina
Browse files

Atualiza Dockerfile

+ Substitui o script de entrypoint

[SOMA-7061][SOMA-7075]
parent c4d420f3
......@@ -5,7 +5,6 @@ RUN cd /tmp/sgarest-daemon && ./install.sh --posix /sgad
FROM repo.tecgraf.puc-rio.br:18089/soma/sga-runtime-ubuntu:20.04
ENV SGAD_HOME /sgad
COPY --from=build /sgad /sgad
WORKDIR /sgad/data
......@@ -13,7 +12,7 @@ WORKDIR /sgad/data
RUN mkdir algorithms logs projects
COPY collect_execution_data .
COPY flowmonitor .
COPY sgad.sh .
COPY Docker/entrypoint.sh .
COPY Docker/sgad.cfg .
VOLUME /sgad/data/projects
......@@ -21,5 +20,7 @@ VOLUME /sgad/data/algorithms
VOLUME /sgad/data/logs
ENV SGAD_HOME /sgad
ENTRYPOINT ["./sgad.sh"]
ENV SGAD_LOGS_DIR $SGAD_HOME/data/logs
ENTRYPOINT ["./entrypoint.sh"]
CMD ["sgad.cfg"]
#!/bin/sh
timestamp=$(date +%Y%m%d%H%M%S)
logfile="${SGAD_LOGS_DIR}/sgad_${SGAD_NAME}_${timestamp}.log"
eval $("${SGAD_HOME}"/bin/luarocks path --bin)
if [ -z "${LOG_TO_FILE}" ]
then
sgad "$@"
else
sgad "$@" 2>&1 | tee -a "${logfile}"
fi
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment