aboutsummaryrefslogtreecommitdiff
path: root/docker/s6/gogs
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2018-09-15 13:57:41 -0400
committerUnknwon <u@gogs.io>2018-09-15 13:57:41 -0400
commit0d48344f93c0a77f288a6edf3321b6018962ca99 (patch)
tree4437c5623cd370e9851caeb540c18a2ac586a711 /docker/s6/gogs
parent21ceba6cfd95da8ba5b804c0abd4aefbedad569f (diff)
docker: chown only for the frist time (#5422)
Diffstat (limited to 'docker/s6/gogs')
1 files changed, 4 insertions, 1 deletions
diff --git a/docker/s6/gogs/setup b/docker/s6/gogs/setup
index ac82e210..7354397c 100755
--- a/docker/s6/gogs/setup
+++ b/docker/s6/gogs/setup
@@ -19,5 +19,8 @@ ln -sfn /data/gogs/data ./data
# Backward Compatibility with Gogs Container v0.6.15
ln -sfn /data/git /home/git
-chown -R git:git /data /app/gogs ~git/
+# Only chown for the first time, '/data/gogs/conf/app.ini' must exist inside Docker after installation
+if ! test -d /data/gogs/conf/app.ini; then
+ chown -R git:git /data /app/gogs ~git/
+fi
chmod 0755 /data /data/gogs ~git/