mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2025-06-28 03:55:11 +00:00
Add readonly-fs compatible configuration for nginx
This commit is contained in:
12
Dockerfile
12
Dockerfile
@ -55,7 +55,8 @@ ENV PYTHONPATH="/usr/local/lib/" \
|
||||
TFW_SUPERVISOR_HTTP_URI="http://localhost:${TFW_SUPERVISOR_HTTP_PORT}" \
|
||||
TFW_SUPERVISORD_CONF="/etc/supervisor/supervisord.conf" \
|
||||
TFW_SUPERVISORD_COMPONENTS="/etc/supervisor/conf" \
|
||||
TFW_NGINX_CONF="/etc/nginx/sites-enabled/default" \
|
||||
TFW_NGINX_CONF="/etc/nginx/nginx.conf" \
|
||||
TFW_NGINX_DEFAULT="/etc/nginx/sites-enabled/default" \
|
||||
TFW_NGINX_COMPONENTS="/etc/nginx/components" \
|
||||
TFW_LIB_DIR="/usr/local/lib/" \
|
||||
TFW_CONTROLLER_DIR="/srv/controller" \
|
||||
@ -73,11 +74,12 @@ RUN echo "shopt -s cmdhist\n" \
|
||||
'PROMPT_COMMAND="history -a"\n' \
|
||||
>> /home/${AVATAO_USER}/.bashrc
|
||||
|
||||
COPY nginx/default.conf ${TFW_NGINX_CONF}
|
||||
COPY nginx/nginx.conf ${TFW_NGINX_CONF}
|
||||
COPY nginx/default.conf ${TFW_NGINX_DEFAULT}
|
||||
COPY nginx/components/ ${TFW_NGINX_COMPONENTS}
|
||||
RUN chown -R ${AVATAO_USER} /var/log/nginx /var/lib/nginx &&\
|
||||
sed -i 's#pid /run/nginx.pid;#pid /tmp/nginx.pid;#g' /etc/nginx/nginx.conf &&\
|
||||
for f in "${TFW_NGINX_CONF}" ${TFW_NGINX_COMPONENTS}/*.conf; do \
|
||||
RUN chown -R ${AVATAO_USER} /var/log/nginx /var/lib/nginx &&\
|
||||
sed -i 's#pid /run/nginx.pid;#pid /tmp/nginx.pid;#g' /etc/nginx/nginx.conf &&\
|
||||
for f in "${TFW_NGINX_DEFAULT}" ${TFW_NGINX_COMPONENTS}/*.conf; do \
|
||||
envsubst "$(printenv | cut -d= -f1 | grep TFW_ | sed -e 's/^/$/g')" < $f > $f~ && mv $f~ $f ;\
|
||||
done
|
||||
|
||||
|
Reference in New Issue
Block a user