aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvictor héry <git@lecygnenoir.info>2019-01-13 14:21:58 +0100
committerChocobozzz <chocobozzz@cpy.re>2019-01-14 09:04:52 +0100
commite902e03f0fd2eded99d635b1f9d2c59f417c4721 (patch)
tree5653f7f5a66fb77394206a5b02f8ccf7617d43e4
parentc04eb647db4f543a31a8100c1ec9a86c700bca6a (diff)
downloadPeerTube-e902e03f0fd2eded99d635b1f9d2c59f417c4721.tar.gz
PeerTube-e902e03f0fd2eded99d635b1f9d2c59f417c4721.tar.zst
PeerTube-e902e03f0fd2eded99d635b1f9d2c59f417c4721.zip
Patch docker entrypoint to speed up the chown at startup
-rwxr-xr-xsupport/docker/production/docker-entrypoint.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/support/docker/production/docker-entrypoint.sh b/support/docker/production/docker-entrypoint.sh
index 6dbbfddf6..7dd626b9f 100755
--- a/support/docker/production/docker-entrypoint.sh
+++ b/support/docker/production/docker-entrypoint.sh
@@ -9,7 +9,7 @@ fi
9# Always copy default and custom env configuration file, in cases where new keys were added 9# Always copy default and custom env configuration file, in cases where new keys were added
10cp /app/config/default.yaml /config 10cp /app/config/default.yaml /config
11cp /app/support/docker/production/config/custom-environment-variables.yaml /config 11cp /app/support/docker/production/config/custom-environment-variables.yaml /config
12chown -R peertube:peertube /config 12find /config ! -user peertube -exec chown peertube:peertube {} \;
13 13
14# first arg is `-f` or `--some-option` 14# first arg is `-f` or `--some-option`
15# or first arg is `something.conf` 15# or first arg is `something.conf`
@@ -19,7 +19,7 @@ fi
19 19
20# allow the container to be started with `--user` 20# allow the container to be started with `--user`
21if [ "$1" = 'npm' -a "$(id -u)" = '0' ]; then 21if [ "$1" = 'npm' -a "$(id -u)" = '0' ]; then
22 chown -R peertube:peertube /data 22 find /data ! -user peertube -exec chown peertube:peertube {} \;
23 exec gosu peertube "$0" "$@" 23 exec gosu peertube "$0" "$@"
24fi 24fi
25 25