forked from cloudron-apps/peertube-app
rework how plugins are installed
This commit is contained in:
parent
b50103ed0d
commit
867fc4e9e4
2 changed files with 10 additions and 5 deletions
|
@ -14,8 +14,7 @@ ARG VERSION=4.1.0
|
|||
# the transcoding patch is at https://github.com/Chocobozzz/PeerTube/pull/3198
|
||||
RUN curl -sL https://github.com/Chocobozzz/PeerTube/releases/download/v${VERSION}/peertube-v${VERSION}.tar.xz | tar --strip-components 1 -Jxvf - && \
|
||||
yarn install --production --pure-lockfile && \
|
||||
sed -e 's/niceness: constants_1.FFMPEG_NICE.TRANSCODING/niceness: constants_1.FFMPEG_NICE.TRANSCODING, cwd: config_1.CONFIG.STORAGE.TMP_DIR/' -i /app/code/server/dist/server/helpers/ffmpeg-utils.js && \
|
||||
chown -R cloudron:cloudron /app/code/server
|
||||
sed -e 's/niceness: constants_1.FFMPEG_NICE.TRANSCODING/niceness: constants_1.FFMPEG_NICE.TRANSCODING, cwd: config_1.CONFIG.STORAGE.TMP_DIR/' -i /app/code/server/dist/server/helpers/ffmpeg-utils.js
|
||||
|
||||
RUN mkdir /app/code/cli && \
|
||||
curl -L https://github.com/Chocobozzz/PeerTube/archive/v${VERSION}.tar.gz | tar -zxvf - --strip-components=1 -C /app/code/cli && \
|
||||
|
|
12
start.sh
12
start.sh
|
@ -15,19 +15,25 @@ update_ldap() {
|
|||
}
|
||||
|
||||
first_time_setup() {
|
||||
echo "==> Starting peertube to run migrations on first run"
|
||||
npm start & # be wary of https://stackoverflow.com/questions/70738567/why-does-running-npm-run-script-as-root-switch-user
|
||||
peertube_pid=$!
|
||||
sleep 10
|
||||
|
||||
while ! curl --silent --output /dev/null --fail http://localhost:9000/; do
|
||||
echo "==> (reset root password) Waiting for peertube to initialize..."
|
||||
echo "==> Waiting for peertube"
|
||||
sleep 5
|
||||
done
|
||||
|
||||
kill -SIGTERM ${peertube_pid} # this kills the process group
|
||||
|
||||
echo "==> Reset root password"
|
||||
echo "changeme" | npm run reset-password -- -u root
|
||||
|
||||
# https://docs.joinpeertube.org/maintain-tools?id=cli-wrapper . Note that we have to restart peertube when installed this way
|
||||
if [[ -n "${CLOUDRON_LDAP_SERVER:-}" ]]; then
|
||||
echo "==> Installing LDAP plugin"
|
||||
cd /app/code/cli && node dist/server/tools/peertube.js plugins install -n peertube-plugin-auth-ldap --url "${CLOUDRON_APP_ORIGIN}" --username root --password changeme
|
||||
npm run plugin:install -- -n peertube-plugin-auth-ldap -v 0.0.10
|
||||
update_ldap
|
||||
fi
|
||||
}
|
||||
|
@ -68,7 +74,7 @@ if [[ ! -f "/app/data/production.yaml" ]]; then
|
|||
cp /app/pkg/production.yaml.example /app/data/production.yaml
|
||||
|
||||
update_config
|
||||
first_time_setup &
|
||||
first_time_setup
|
||||
else
|
||||
update_config
|
||||
|
||||
|
|
Loading…
Reference in a new issue