aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/docker/production/docker-entrypoint.sh
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-04-16 18:44:57 +0200
committerChocobozzz <me@florianbigard.com>2018-04-16 18:44:57 +0200
commit4aeb67a569b30a233dcff2eaf9c564d62ccd6497 (patch)
tree9851e0c0206e6d87ac23b50ec11d0f092ffd9594 /support/docker/production/docker-entrypoint.sh
parent94ff4c2335ace54b36b2bca96f63226ee8f575b1 (diff)
downloadPeerTube-4aeb67a569b30a233dcff2eaf9c564d62ccd6497.tar.gz
PeerTube-4aeb67a569b30a233dcff2eaf9c564d62ccd6497.tar.zst
PeerTube-4aeb67a569b30a233dcff2eaf9c564d62ccd6497.zip
Improve dockerfile
Diffstat (limited to 'support/docker/production/docker-entrypoint.sh')
-rwxr-xr-xsupport/docker/production/docker-entrypoint.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/support/docker/production/docker-entrypoint.sh b/support/docker/production/docker-entrypoint.sh
index 79f0e60f6..4099a1984 100755
--- a/support/docker/production/docker-entrypoint.sh
+++ b/support/docker/production/docker-entrypoint.sh
@@ -4,13 +4,13 @@ set -e
4# first arg is `-f` or `--some-option` 4# first arg is `-f` or `--some-option`
5# or first arg is `something.conf` 5# or first arg is `something.conf`
6if [ "${1#-}" != "$1" ] || [ "${1%.conf}" != "$1" ]; then 6if [ "${1#-}" != "$1" ] || [ "${1%.conf}" != "$1" ]; then
7 set -- npm "$@" 7 set -- npm "$@"
8fi 8fi
9 9
10# allow the container to be started with `--user` 10# allow the container to be started with `--user`
11if [ "$1" = 'npm' -a "$(id -u)" = '0' ]; then 11if [ "$1" = 'npm' -a "$(id -u)" != '0' ]; then
12 chown -R peertube: /data 12 chown -R peertube:peertube /data
13 exec gosu peertube "$0" "$@" 13 exec gosu peertube "$0" "$@"
14fi 14fi
15 15
16exec "$@" 16exec "$@"