diff options
author | Chocobozzz <me@florianbigard.com> | 2018-05-07 18:39:42 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-05-07 18:41:10 +0200 |
commit | fd5e57bbe2accbdb16b6aa65337c5ef44b5bd8fb (patch) | |
tree | 7865c16ce0f4be446d0e54174ef5c210917c7f46 /support/docker/production/docker-entrypoint.sh | |
parent | d9c1882dd050f4a867a4bbfc3667424e41694ae1 (diff) | |
download | PeerTube-fd5e57bbe2accbdb16b6aa65337c5ef44b5bd8fb.tar.gz PeerTube-fd5e57bbe2accbdb16b6aa65337c5ef44b5bd8fb.tar.zst PeerTube-fd5e57bbe2accbdb16b6aa65337c5ef44b5bd8fb.zip |
Docker config directory as volume
Diffstat (limited to 'support/docker/production/docker-entrypoint.sh')
-rwxr-xr-x | support/docker/production/docker-entrypoint.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/support/docker/production/docker-entrypoint.sh b/support/docker/production/docker-entrypoint.sh index ba9fcfed5..8ee968b3d 100755 --- a/support/docker/production/docker-entrypoint.sh +++ b/support/docker/production/docker-entrypoint.sh | |||
@@ -1,6 +1,13 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | set -e | 2 | set -e |
3 | 3 | ||
4 | # Populate config directory | ||
5 | if [ -z "$(ls -A /config)" ]; then | ||
6 | cp /app/support/docker/production/config/* /config | ||
7 | cp /app/config/default.yaml /config | ||
8 | chown -R peertube:peertube /config | ||
9 | fi | ||
10 | |||
4 | # first arg is `-f` or `--some-option` | 11 | # first arg is `-f` or `--some-option` |
5 | # or first arg is `something.conf` | 12 | # or first arg is `something.conf` |
6 | if [ "${1#-}" != "$1" ] || [ "${1%.conf}" != "$1" ]; then | 13 | if [ "${1#-}" != "$1" ] || [ "${1%.conf}" != "$1" ]; then |