From f390d78f7213d3e6c4c51d7b23a055825a89496b Mon Sep 17 00:00:00 2001 From: Gerhard Schlager Date: Fri, 5 Oct 2018 01:31:59 +0200 Subject: [PATCH] Move tmp directories for backups and restores into /shared (#411) Large temporary files shouldn't be stored inside of the Docker container. --- templates/web.template.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/templates/web.template.yml b/templates/web.template.yml index e71ff7e..6a1b6ba 100644 --- a/templates/web.template.yml +++ b/templates/web.template.yml @@ -107,7 +107,9 @@ run: - bash -c "ln -s /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr}.log $home/log" - bash -c "mkdir -p /shared/{uploads,backups}" - bash -c "ln -s /shared/{uploads,backups} $home/public" - - chown -R discourse:www-data /shared/log/rails /shared/uploads /shared/backups + - bash -c "mkdir -p /shared/tmp/{backups,restores}" + - bash -c "ln -s /shared/tmp/{backups,restores} $home/tmp" + - chown -R discourse:www-data /shared/log/rails /shared/uploads /shared/backups /shared/tmp - exec: cmd: @@ -272,6 +274,10 @@ run: chown -R discourse:www-data /shared/backups fi + rm -rf /shared/tmp/{backups,restores} + mkdir -p /shared/tmp/{backups,restores} + chown -R discourse:www-data /shared/tmp/{backups,restores} + # change login directory to Discourse home - file: path: /root/.bash_profile -- 2.25.1