mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2025-06-28 09:35:11 +00:00
Split supervisor configuration to several files
This commit is contained in:
15
Dockerfile
15
Dockerfile
@ -57,21 +57,24 @@ ENV TFW_TERMINADO_DIR="/tmp/terminado_server"
|
||||
ENV TFW_TERMINADO_WD="/home/${AVATAO_USER}"
|
||||
ENV TFW_LIB_DIR="/usr/local/lib/"
|
||||
ENV TFW_SUPERVISORD_CONF="/etc/supervisor/supervisord.conf"
|
||||
ENV TFW_SUPERVISORD_COMPONENTS="/etc/supervisor/conf"
|
||||
ENV PYTHONPATH=${TFW_LIB_DIR}
|
||||
|
||||
COPY nginx /etc/nginx
|
||||
RUN chown -R ${AVATAO_USER}: /var/log/nginx /var/lib/nginx && \
|
||||
COPY lib ${TFW_LIB_DIR}
|
||||
COPY supervisor/supervisord.conf ${TFW_SUPERVISORD_CONF}
|
||||
COPY supervisor/components/ ${TFW_SUPERVISORD_COMPONENTS}
|
||||
COPY src/app ${TFW_APP_DIR}
|
||||
COPY src/event_handlers ${TFW_EVENT_HANDLERS_DIR}
|
||||
|
||||
RUN chown -R ${AVATAO_USER}: /var/log/nginx /var/lib/nginx &&\
|
||||
# nginx runs as a regular user, and can't write to /run
|
||||
sed -i 's#pid /run/nginx.pid;#pid /tmp/nginx.pid;#g' /etc/nginx/nginx.conf && \
|
||||
sed -i 's#pid /run/nginx.pid;#pid /tmp/nginx.pid;#g' /etc/nginx/nginx.conf &&\
|
||||
envsubst "$(printenv | cut -d= -f1 | grep TFW_ | sed -e 's/^/$/g')" \
|
||||
< /etc/nginx/sites-available/default > /etc/nginx/sites-available/default &&\
|
||||
mv /data/dist ${TFW_FRONTEND_DIR}
|
||||
|
||||
USER ${AVATAO_USER}
|
||||
WORKDIR /home/${AVATAO_USER}
|
||||
COPY lib ${TFW_LIB_DIR}
|
||||
COPY supervisor/supervisord.conf ${TFW_SUPERVISORD_CONF}
|
||||
COPY src/app ${TFW_APP_DIR}
|
||||
COPY src/event_handlers ${TFW_EVENT_HANDLERS_DIR}
|
||||
|
||||
CMD . "$HOME/.pyenvrc" && exec supervisord --nodaemon
|
||||
|
Reference in New Issue
Block a user