Change how logs are written to the terminal. Turns out, due to the way AUFS works, you have to wait until the files have been touched (and the inode updated) before you tail something, otherwise it locks to an inode of a the file in the image, rather than the updated file in the unpacked filesystem. Causing nothing to be shown.
This commit is contained in:
parent
4427b2639b
commit
4cfe8f4988
4 changed files with 8 additions and 11 deletions
|
|
@ -50,10 +50,8 @@ RUN rm -fr /var/www/html && \
|
|||
mv NginxDefault /etc/nginx/sites-enabled/default && \
|
||||
mkdir /etc/service/nginx && \
|
||||
mkdir /etc/service/php-fpm && \
|
||||
mkdir /etc/service/show_logs && \
|
||||
mv run.nginx.sh /etc/service/nginx/run && \
|
||||
mv run.php-fpm.sh /etc/service/php-fpm/run && \
|
||||
mv run.show_logs.sh /etc/service/show_logs/run && \
|
||||
mv nginx.runit /etc/service/nginx/run && \
|
||||
mv php-fpm.runit /etc/service/php-fpm/run && \
|
||||
chmod +x /etc/service/*/run && \
|
||||
rm /app/* && \
|
||||
sed -i "s/{{PHP}}/{{PHPVERSION}}/g" /etc/nginx/sites-enabled/default && \
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
sleep 3;
|
||||
/usr/sbin/nginx
|
||||
sleep 3;
|
||||
tail -f /var/log/nginx/error.log &
|
||||
tail -f /var/log/nginx/access.log
|
||||
|
||||
|
|
@ -4,5 +4,6 @@ sleep 3;
|
|||
env | sed "s/\(.*\)=\(.*\)/env[\1]='\2'/" > /etc/php/{{PHP}}/fpm/conf.d/env.conf
|
||||
cat /etc/php/{{PHP}}/fpm/conf.d/env.conf
|
||||
/usr/sbin/php-fpm{{PHP}}
|
||||
sleep infinity;
|
||||
sleep 3;
|
||||
tail -f /var/log/php*-fpm.log
|
||||
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
sleep 3;
|
||||
/usr/sbin/nginx
|
||||
sleep infinity;
|
||||
|
||||
Loading…
Reference in a new issue