aboutsummaryrefslogtreecommitdiffhomepage
path: root/support
diff options
context:
space:
mode:
authorJelle Besseling <jelle@pingiun.com>2021-10-12 13:33:44 +0200
committerGitHub <noreply@github.com>2021-10-12 13:33:44 +0200
commit8d8a037e3fe9b1d2ccbc4169ce59b13000b59cb0 (patch)
tree755ba56bc3acbd82ec195974545581c1e49aae5e /support
parentbadacdbb4a3e4a1aae4d324abc496be8e261b2ef (diff)
downloadPeerTube-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.buster3
-rw-r--r--support/docker/production/config/custom-environment-variables.yaml7
-rwxr-xr-xsupport/docker/production/entrypoint.sh9
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
33RUN chown -R peertube:peertube /data /config 33RUN chown -R peertube:peertube /data /config
34 34
35ENV NODE_ENV production 35ENV NODE_ENV production
36ENV NODE_CONFIG_DIR /config 36ENV NODE_CONFIG_DIR /app/config:/app/support/docker/production/config:/config
37ENV PEERTUBE_LOCAL_CONFIG /config
37 38
38VOLUME /data 39VOLUME /data
39VOLUME /config 40VOLUME /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
71webadmin:
72 configuration:
73 edit:
74 allowed:
75 __name: "PEERTUBE_ALLOW_WEBADMIN_CONFIG"
76 __format: "json"
77
71log: 78log:
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
2set -e 2set -e
3 3
4# Populate config directory
5if [ -z "$(ls -A /config)" ]; then
6 cp /app/support/docker/production/config/* /config
7fi
8 4
9# Always copy default and custom env configuration file, in cases where new keys were added 5find /config ! -user peertube -exec chown peertube:peertube {} \; || true
10cp /app/config/default.yaml /config
11cp /app/support/docker/production/config/custom-environment-variables.yaml /config
12find /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`