diff options
author | Jelle Besseling <jelle@pingiun.com> | 2021-10-12 13:33:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-12 13:33:44 +0200 |
commit | 8d8a037e3fe9b1d2ccbc4169ce59b13000b59cb0 (patch) | |
tree | 755ba56bc3acbd82ec195974545581c1e49aae5e /support | |
parent | badacdbb4a3e4a1aae4d324abc496be8e261b2ef (diff) | |
download | PeerTube-8d8a037e3fe9b1d2ccbc4169ce59b13000b59cb0.tar.gz PeerTube-8d8a037e3fe9b1d2ccbc4169ce59b13000b59cb0.tar.zst PeerTube-8d8a037e3fe9b1d2ccbc4169ce59b13000b59cb0.zip |
Allow configuration to be static/readonly (#4315)
* Allow configuration to be static/readonly
* Make all components disableable
* Improve disabled component styling
* Rename edits allowed field in configuration
* Fix CI
Diffstat (limited to 'support')
-rw-r--r-- | support/docker/production/Dockerfile.buster | 3 | ||||
-rw-r--r-- | support/docker/production/config/custom-environment-variables.yaml | 7 | ||||
-rwxr-xr-x | support/docker/production/entrypoint.sh | 9 |
3 files changed, 10 insertions, 9 deletions
diff --git a/support/docker/production/Dockerfile.buster b/support/docker/production/Dockerfile.buster index 2ff0591f9..163c514f5 100644 --- a/support/docker/production/Dockerfile.buster +++ b/support/docker/production/Dockerfile.buster | |||
@@ -33,7 +33,8 @@ RUN mkdir /data /config | |||
33 | RUN chown -R peertube:peertube /data /config | 33 | RUN chown -R peertube:peertube /data /config |
34 | 34 | ||
35 | ENV NODE_ENV production | 35 | ENV NODE_ENV production |
36 | ENV NODE_CONFIG_DIR /config | 36 | ENV NODE_CONFIG_DIR /app/config:/app/support/docker/production/config:/config |
37 | ENV PEERTUBE_LOCAL_CONFIG /config | ||
37 | 38 | ||
38 | VOLUME /data | 39 | VOLUME /data |
39 | VOLUME /config | 40 | VOLUME /config |
diff --git a/support/docker/production/config/custom-environment-variables.yaml b/support/docker/production/config/custom-environment-variables.yaml index 1b474582a..7c430a995 100644 --- a/support/docker/production/config/custom-environment-variables.yaml +++ b/support/docker/production/config/custom-environment-variables.yaml | |||
@@ -68,6 +68,13 @@ object_storage: | |||
68 | prefix: "PEERTUBE_OBJECT_STORAGE_VIDEOS_PREFIX" | 68 | prefix: "PEERTUBE_OBJECT_STORAGE_VIDEOS_PREFIX" |
69 | base_url: "PEERTUBE_OBJECT_STORAGE_VIDEOS_BASE_URL" | 69 | base_url: "PEERTUBE_OBJECT_STORAGE_VIDEOS_BASE_URL" |
70 | 70 | ||
71 | webadmin: | ||
72 | configuration: | ||
73 | edit: | ||
74 | allowed: | ||
75 | __name: "PEERTUBE_ALLOW_WEBADMIN_CONFIG" | ||
76 | __format: "json" | ||
77 | |||
71 | log: | 78 | log: |
72 | level: "PEERTUBE_LOG_LEVEL" | 79 | level: "PEERTUBE_LOG_LEVEL" |
73 | log_ping_requests: | 80 | log_ping_requests: |
diff --git a/support/docker/production/entrypoint.sh b/support/docker/production/entrypoint.sh index 7dd626b9f..261055e84 100755 --- a/support/docker/production/entrypoint.sh +++ b/support/docker/production/entrypoint.sh | |||
@@ -1,15 +1,8 @@ | |||
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 | fi | ||
8 | 4 | ||
9 | # Always copy default and custom env configuration file, in cases where new keys were added | 5 | find /config ! -user peertube -exec chown peertube:peertube {} \; || true |
10 | cp /app/config/default.yaml /config | ||
11 | cp /app/support/docker/production/config/custom-environment-variables.yaml /config | ||
12 | find /config ! -user peertube -exec chown peertube:peertube {} \; | ||
13 | 6 | ||
14 | # first arg is `-f` or `--some-option` | 7 | # first arg is `-f` or `--some-option` |
15 | # or first arg is `something.conf` | 8 | # or first arg is `something.conf` |