From 1d23dbcf04aa11a35cd594a458f4e1d3a4e8944a Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Tue, 24 Nov 2015 10:52:20 -0800 Subject: [PATCH] place log files in /run since /var/log is readonly --- Dockerfile | 6 +++--- app.ini.template | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 52d1152..f3e9d79 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,7 +29,8 @@ ADD app.ini.template /home/cloudron/app.ini.template RUN mkdir -p /run/gogs && chown -R cloudron:cloudron /run/gogs # setup log paths -RUN mkdir -p /var/log/gogs && chown -R cloudron:cloudron /var/log/gogs +RUN mkdir -p /run/gogs && chown -R cloudron:cloudron /run/gogs +RUN sed -e 's,^logfile=.*$,logfile=/run/gogs/supervisord.log,' -i /etc/supervisor/supervisord.conf RUN ln -s /app/data/ssh /home/cloudron/.ssh RUN ln -s /app/data/gitconfig /home/cloudron/.gitconfig @@ -37,8 +38,7 @@ RUN ln -s /app/data/gitconfig /home/cloudron/.gitconfig ADD start.sh /home/cloudron/start.sh # disable pam authentication for sshd -RUN sed 's/UsePAM yes/UsePAM no/' -i /etc/ssh/sshd_config -RUN sed 's/UsePrivilegeSeparation yes/UsePrivilegeSeparation no/' -i /etc/ssh/sshd_config +RUN sed -e 's/UsePAM yes/UsePAM no/' -e 's/UsePrivilegeSeparation yes/UsePrivilegeSeparation no/' -i /etc/ssh/sshd_config RUN echo "UseDNS no" >> /etc/ssh/sshd_config CMD [ "/home/cloudron/start.sh" ] diff --git a/app.ini.template b/app.ini.template index b135660..d0f9b69 100644 --- a/app.ini.template +++ b/app.ini.template @@ -48,4 +48,4 @@ ENABLE_NOTIFY_MAIL = true ; Either "console", "file", "conn", "smtp" or "database", default is "console" MODE = console ; used for xorm.log -ROOT_PATH = /var/log/gogs +ROOT_PATH = /run/gogs