mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-02 17:29:29 +02:00
Migrate to pnpm
This commit is contained in:
parent
bbc1afada5
commit
906b5f7f2c
47 changed files with 24183 additions and 23477 deletions
2
.github/CONTRIBUTING.md
vendored
2
.github/CONTRIBUTING.md
vendored
|
@ -79,7 +79,7 @@ First, you should use a server or PC with at least 4GB of RAM. Less RAM may lead
|
|||
git clone https://github.com/Chocobozzz/PeerTube
|
||||
cd PeerTube
|
||||
git remote add me git@github.com:YOUR_GITHUB_USERNAME/PeerTube.git
|
||||
yarn install --pure-lockfile
|
||||
npm run install-node-dependencies
|
||||
```
|
||||
|
||||
Note that development is done on the `develop` branch. If you want to hack on
|
||||
|
|
|
@ -11,32 +11,20 @@ runs:
|
|||
using: "composite"
|
||||
|
||||
steps:
|
||||
- uses: pnpm/action-setup@v4
|
||||
name: Install pnpm
|
||||
with:
|
||||
run_install: false
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ inputs.node-version }}
|
||||
|
||||
- name: Cache Node.js modules
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
**/node_modules
|
||||
key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.OS }}-node-
|
||||
${{ runner.OS }}-
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
- name: Install peertube runner dependencies
|
||||
shell: bash
|
||||
run: cd apps/peertube-runner && yarn install --frozen-lockfile
|
||||
|
||||
- name: Install peertube CLI dependencies
|
||||
shell: bash
|
||||
run: cd apps/peertube-cli && yarn install --frozen-lockfile
|
||||
run: npm run install-node-dependencies
|
||||
|
||||
- name: Display PeerTube dependencies
|
||||
shell: bash
|
||||
|
|
2
.github/workflows/stats.yml
vendored
2
.github/workflows/stats.yml
vendored
|
@ -34,7 +34,7 @@ jobs:
|
|||
run: |
|
||||
wget "https://github.com/boyter/scc/releases/download/v3.0.0/scc-3.0.0-x86_64-unknown-linux.zip"
|
||||
unzip "scc-3.0.0-x86_64-unknown-linux.zip"
|
||||
./scc --format=json --exclude-dir .git,node_modules,client/node_modules,client/dist,dist,yarn.lock,client/yarn.lock,client/src/locale,test1,test2,test3,client/src/assets/images,config,storage,packages/tests/fixtures,support/openapi,.idea,.vscode,docker-volume,ffmpeg-3,ffmpeg-4 > ./scc.json
|
||||
./scc --format=json --exclude-dir .git,node_modules,client/node_modules,client/dist,dist,pnpm-lock.yaml,client/src/locale,test1,test2,test3,client/src/assets/images,config,storage,packages/tests/fixtures,support/openapi,.idea,.vscode,docker-volume,ffmpeg-3,ffmpeg-4 > ./scc.json
|
||||
|
||||
- name: PeerTube client stats
|
||||
if: github.event_name != 'pull_request'
|
||||
|
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,9 +1,7 @@
|
|||
# NPM instalation
|
||||
node_modules
|
||||
*npm-debug.log
|
||||
yarn-error.log
|
||||
*-ci.log
|
||||
.yarn
|
||||
|
||||
# Testing
|
||||
/test1/
|
||||
|
|
|
@ -10,8 +10,7 @@ See https://docs.joinpeertube.org/maintain/tools#remote-tools
|
|||
|
||||
```bash
|
||||
cd peertube-root
|
||||
yarn install --pure-lockfile
|
||||
cd apps/peertube-cli && yarn install --pure-lockfile
|
||||
npm run install-node-dependencies
|
||||
```
|
||||
|
||||
## Develop
|
||||
|
|
|
@ -1,236 +0,0 @@
|
|||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@colors/colors@1.5.0":
|
||||
version "1.5.0"
|
||||
resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9"
|
||||
integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==
|
||||
|
||||
ansi-regex@^5.0.1:
|
||||
version "5.0.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
|
||||
integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
|
||||
|
||||
application-config-path@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/application-config-path/-/application-config-path-1.0.0.tgz#9c25b8c00ac9a342db27275abd3f38c67bbe5a05"
|
||||
integrity sha512-6ZDlLTlfqrTybVzZJDpX2K2ZufqyMyiTbOG06GpxmkmczFgTN+YYRGcTcMCXv/F5P5SrZijVjzzpPUE9BvheLg==
|
||||
|
||||
application-config@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/application-config/-/application-config-3.0.0.tgz#9adec84dd2d81e97dd78ea0dffcbf97381a1f55c"
|
||||
integrity sha512-7ViR4soQJDx2O9iLf1vGxvekkPqvwqV/AZ2OL3DNcAQrg03UjJE1VeBk7oYNoN9AKB0eNyVrcM7kPD30NKeLLw==
|
||||
dependencies:
|
||||
application-config-path "^1.0.0"
|
||||
load-json-file "^7.0.1"
|
||||
write-json-file "^5.0.0"
|
||||
|
||||
cli-table3@^0.6.0:
|
||||
version "0.6.5"
|
||||
resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.5.tgz#013b91351762739c16a9567c21a04632e449bf2f"
|
||||
integrity sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==
|
||||
dependencies:
|
||||
string-width "^4.2.0"
|
||||
optionalDependencies:
|
||||
"@colors/colors" "1.5.0"
|
||||
|
||||
cross-spawn@^6.0.0:
|
||||
version "6.0.6"
|
||||
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.6.tgz#30d0efa0712ddb7eb5a76e1e8721bffafa6b5d57"
|
||||
integrity sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw==
|
||||
dependencies:
|
||||
nice-try "^1.0.4"
|
||||
path-key "^2.0.1"
|
||||
semver "^5.5.0"
|
||||
shebang-command "^1.2.0"
|
||||
which "^1.2.9"
|
||||
|
||||
debug@^3.1.0:
|
||||
version "3.2.7"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a"
|
||||
integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==
|
||||
dependencies:
|
||||
ms "^2.1.1"
|
||||
|
||||
detect-indent@^7.0.0:
|
||||
version "7.0.1"
|
||||
resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-7.0.1.tgz#cbb060a12842b9c4d333f1cac4aa4da1bb66bc25"
|
||||
integrity sha512-Mc7QhQ8s+cLrnUfU/Ji94vG/r8M26m8f++vyres4ZoojaRDpZ1eSIh/EpzLNwlWuvzSZ3UbDFspjFvTDXe6e/g==
|
||||
|
||||
emoji-regex@^8.0.0:
|
||||
version "8.0.0"
|
||||
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
|
||||
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
|
||||
|
||||
execa@^0.10.0:
|
||||
version "0.10.0"
|
||||
resolved "https://registry.yarnpkg.com/execa/-/execa-0.10.0.tgz#ff456a8f53f90f8eccc71a96d11bdfc7f082cb50"
|
||||
integrity sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw==
|
||||
dependencies:
|
||||
cross-spawn "^6.0.0"
|
||||
get-stream "^3.0.0"
|
||||
is-stream "^1.1.0"
|
||||
npm-run-path "^2.0.0"
|
||||
p-finally "^1.0.0"
|
||||
signal-exit "^3.0.0"
|
||||
strip-eof "^1.0.0"
|
||||
|
||||
get-stream@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
|
||||
integrity sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ==
|
||||
|
||||
imurmurhash@^0.1.4:
|
||||
version "0.1.4"
|
||||
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
|
||||
integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==
|
||||
|
||||
is-fullwidth-code-point@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"
|
||||
integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
|
||||
|
||||
is-plain-obj@^4.0.0:
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-4.1.0.tgz#d65025edec3657ce032fd7db63c97883eaed71f0"
|
||||
integrity sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==
|
||||
|
||||
is-stream@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
|
||||
integrity sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==
|
||||
|
||||
is-typedarray@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
|
||||
integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==
|
||||
|
||||
isexe@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
|
||||
integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==
|
||||
|
||||
load-json-file@^7.0.1:
|
||||
version "7.0.1"
|
||||
resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-7.0.1.tgz#a3c9fde6beffb6bedb5acf104fad6bb1604e1b00"
|
||||
integrity sha512-Gnxj3ev3mB5TkVBGad0JM6dmLiQL+o0t23JPBZ9sd+yvSLk05mFoqKBw5N8gbbkU4TNXyqCgIrl/VM17OgUIgQ==
|
||||
|
||||
ms@^2.1.1:
|
||||
version "2.1.3"
|
||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
|
||||
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
|
||||
|
||||
netrc-parser@^3.1.6:
|
||||
version "3.1.6"
|
||||
resolved "https://registry.yarnpkg.com/netrc-parser/-/netrc-parser-3.1.6.tgz#7243c9ec850b8e805b9bdc7eae7b1450d4a96e72"
|
||||
integrity sha512-lY+fmkqSwntAAjfP63jB4z5p5WbuZwyMCD3pInT7dpHU/Gc6Vv90SAC6A0aNiqaRGHiuZFBtiwu+pu8W/Eyotw==
|
||||
dependencies:
|
||||
debug "^3.1.0"
|
||||
execa "^0.10.0"
|
||||
|
||||
nice-try@^1.0.4:
|
||||
version "1.0.5"
|
||||
resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
|
||||
integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==
|
||||
|
||||
npm-run-path@^2.0.0:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f"
|
||||
integrity sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==
|
||||
dependencies:
|
||||
path-key "^2.0.0"
|
||||
|
||||
p-finally@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
|
||||
integrity sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==
|
||||
|
||||
path-key@^2.0.0, path-key@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
|
||||
integrity sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==
|
||||
|
||||
semver@^5.5.0:
|
||||
version "5.7.2"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8"
|
||||
integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==
|
||||
|
||||
shebang-command@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
|
||||
integrity sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==
|
||||
dependencies:
|
||||
shebang-regex "^1.0.0"
|
||||
|
||||
shebang-regex@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
|
||||
integrity sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==
|
||||
|
||||
signal-exit@^3.0.0, signal-exit@^3.0.2:
|
||||
version "3.0.7"
|
||||
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9"
|
||||
integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==
|
||||
|
||||
sort-keys@^5.0.0:
|
||||
version "5.1.0"
|
||||
resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-5.1.0.tgz#50a3f3d1ad3c5a76d043e0aeeba7299241e9aa5c"
|
||||
integrity sha512-aSbHV0DaBcr7u0PVHXzM6NbZNAtrr9sF6+Qfs9UUVG7Ll3jQ6hHi8F/xqIIcn2rvIVbr0v/2zyjSdwSV47AgLQ==
|
||||
dependencies:
|
||||
is-plain-obj "^4.0.0"
|
||||
|
||||
string-width@^4.2.0:
|
||||
version "4.2.3"
|
||||
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
|
||||
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
|
||||
dependencies:
|
||||
emoji-regex "^8.0.0"
|
||||
is-fullwidth-code-point "^3.0.0"
|
||||
strip-ansi "^6.0.1"
|
||||
|
||||
strip-ansi@^6.0.1:
|
||||
version "6.0.1"
|
||||
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
|
||||
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
|
||||
dependencies:
|
||||
ansi-regex "^5.0.1"
|
||||
|
||||
strip-eof@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"
|
||||
integrity sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==
|
||||
|
||||
typedarray-to-buffer@^3.1.5:
|
||||
version "3.1.5"
|
||||
resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080"
|
||||
integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==
|
||||
dependencies:
|
||||
is-typedarray "^1.0.0"
|
||||
|
||||
which@^1.2.9:
|
||||
version "1.3.1"
|
||||
resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
|
||||
integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==
|
||||
dependencies:
|
||||
isexe "^2.0.0"
|
||||
|
||||
write-file-atomic@^3.0.3:
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.3.tgz#56bd5c5a5c70481cd19c571bd39ab965a5de56e8"
|
||||
integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==
|
||||
dependencies:
|
||||
imurmurhash "^0.1.4"
|
||||
is-typedarray "^1.0.0"
|
||||
signal-exit "^3.0.2"
|
||||
typedarray-to-buffer "^3.1.5"
|
||||
|
||||
write-json-file@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-5.0.0.tgz#11c329a8ea9e8e23fb92a87cc27412a15f87708b"
|
||||
integrity sha512-ddSsCLa4aQ3kI21BthINo4q905/wfhvQ3JL3774AcRjBaiQmfn5v4rw77jQ7T6CmAit9VOQO+FsLyPkwxoB1fw==
|
||||
dependencies:
|
||||
detect-indent "^7.0.0"
|
||||
is-plain-obj "^4.0.0"
|
||||
sort-keys "^5.0.0"
|
||||
write-file-atomic "^3.0.3"
|
|
@ -10,8 +10,7 @@ Commands below has to be run at the root of PeerTube git repository.
|
|||
|
||||
```bash
|
||||
cd peertube-root
|
||||
yarn install --pure-lockfile
|
||||
cd apps/peertube-runner && yarn install --pure-lockfile
|
||||
npm run install-node-dependencies
|
||||
```
|
||||
|
||||
### Develop
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
"main": "dist/peertube-runner.js",
|
||||
"bin": "dist/peertube-runner.js",
|
||||
"license": "AGPL-3.0",
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@iarna/toml": "^2.2.5",
|
||||
"@types/follow-redirects": "1.14.4",
|
||||
"cli-table3": "^0.6.5",
|
||||
"env-paths": "^3.0.0",
|
||||
"follow-redirects": "^1.15.5",
|
||||
"net-ipc": "^2.2.2",
|
||||
|
|
|
@ -21,7 +21,7 @@ import { processVideoTranscription } from './shared/process-transcription.js'
|
|||
export async function processJob (options: ProcessOptions) {
|
||||
const { server, job } = options
|
||||
|
||||
logger.info(`[${server.url}] Processing job of type ${job.type}: ${job.uuid}`, { payload: job.payload })
|
||||
logger.info({ payload: job.payload }, `[${server.url}] Processing job of type ${job.type}: ${job.uuid}`)
|
||||
|
||||
switch (job.type) {
|
||||
case 'vod-audio-merge-transcoding':
|
||||
|
|
|
@ -57,7 +57,7 @@ export class RunnerServer {
|
|||
try {
|
||||
await ipcServer.run(this)
|
||||
} catch (err) {
|
||||
logger.error('Cannot start local socket for IPC communication', err)
|
||||
logger.error(err, 'Cannot start local socket for IPC communication')
|
||||
process.exit(-1)
|
||||
}
|
||||
|
||||
|
|
|
@ -63,6 +63,6 @@ export class IPCServer {
|
|||
body: IPCResponse<T>
|
||||
) {
|
||||
response(body)
|
||||
.catch(err => logger.error('Cannot send response after IPC request', err))
|
||||
.catch(err => logger.error(err, 'Cannot send response after IPC request'))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,287 +0,0 @@
|
|||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@iarna/toml@^2.2.5":
|
||||
version "2.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@iarna/toml/-/toml-2.2.5.tgz#b32366c89b43c6f8cefbdefac778b9c828e3ba8c"
|
||||
integrity sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==
|
||||
|
||||
"@msgpackr-extract/msgpackr-extract-darwin-arm64@3.0.3":
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-darwin-arm64/-/msgpackr-extract-darwin-arm64-3.0.3.tgz#9edec61b22c3082018a79f6d1c30289ddf3d9d11"
|
||||
integrity sha512-QZHtlVgbAdy2zAqNA9Gu1UpIuI8Xvsd1v8ic6B2pZmeFnFcMWiPLfWXh7TVw4eGEZ/C9TH281KwhVoeQUKbyjw==
|
||||
|
||||
"@msgpackr-extract/msgpackr-extract-darwin-x64@3.0.3":
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-darwin-x64/-/msgpackr-extract-darwin-x64-3.0.3.tgz#33677a275204898ad8acbf62734fc4dc0b6a4855"
|
||||
integrity sha512-mdzd3AVzYKuUmiWOQ8GNhl64/IoFGol569zNRdkLReh6LRLHOXxU4U8eq0JwaD8iFHdVGqSy4IjFL4reoWCDFw==
|
||||
|
||||
"@msgpackr-extract/msgpackr-extract-linux-arm64@3.0.3":
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-linux-arm64/-/msgpackr-extract-linux-arm64-3.0.3.tgz#19edf7cdc2e7063ee328403c1d895a86dd28f4bb"
|
||||
integrity sha512-YxQL+ax0XqBJDZiKimS2XQaf+2wDGVa1enVRGzEvLLVFeqa5kx2bWbtcSXgsxjQB7nRqqIGFIcLteF/sHeVtQg==
|
||||
|
||||
"@msgpackr-extract/msgpackr-extract-linux-arm@3.0.3":
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-linux-arm/-/msgpackr-extract-linux-arm-3.0.3.tgz#94fb0543ba2e28766c3fc439cabbe0440ae70159"
|
||||
integrity sha512-fg0uy/dG/nZEXfYilKoRe7yALaNmHoYeIoJuJ7KJ+YyU2bvY8vPv27f7UKhGRpY6euFYqEVhxCFZgAUNQBM3nw==
|
||||
|
||||
"@msgpackr-extract/msgpackr-extract-linux-x64@3.0.3":
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-linux-x64/-/msgpackr-extract-linux-x64-3.0.3.tgz#4a0609ab5fe44d07c9c60a11e4484d3c38bbd6e3"
|
||||
integrity sha512-cvwNfbP07pKUfq1uH+S6KJ7dT9K8WOE4ZiAcsrSes+UY55E/0jLYc+vq+DO7jlmqRb5zAggExKm0H7O/CBaesg==
|
||||
|
||||
"@msgpackr-extract/msgpackr-extract-win32-x64@3.0.3":
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-win32-x64/-/msgpackr-extract-win32-x64-3.0.3.tgz#0aa5502d547b57abfc4ac492de68e2006e417242"
|
||||
integrity sha512-x0fWaQtYp4E6sktbsdAqnehxDgEc/VwM7uLsRCYWaiGu0ykYdZPiS8zCWdnjHwyiumousxfBm4SO31eXqwEZhQ==
|
||||
|
||||
"@types/follow-redirects@1.14.4":
|
||||
version "1.14.4"
|
||||
resolved "https://registry.yarnpkg.com/@types/follow-redirects/-/follow-redirects-1.14.4.tgz#ca054d72ef574c77949fc5fff278b430fcd508ec"
|
||||
integrity sha512-GWXfsD0Jc1RWiFmMuMFCpXMzi9L7oPDVwxUnZdg89kDNnqsRfUKXEtUYtA98A6lig1WXH/CYY/fvPW9HuN5fTA==
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/node@*":
|
||||
version "24.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-24.1.0.tgz#0993f7dc31ab5cc402d112315b463e383d68a49c"
|
||||
integrity sha512-ut5FthK5moxFKH2T1CUOC6ctR67rQRvvHdFLCD2Ql6KXmMuCrjsSsRI9UsLCm9M18BMwClv4pn327UvB7eeO1w==
|
||||
dependencies:
|
||||
undici-types "~7.8.0"
|
||||
|
||||
atomic-sleep@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/atomic-sleep/-/atomic-sleep-1.0.0.tgz#eb85b77a601fc932cfe432c5acd364a9e2c9075b"
|
||||
integrity sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==
|
||||
|
||||
colorette@^2.0.7:
|
||||
version "2.0.20"
|
||||
resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a"
|
||||
integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==
|
||||
|
||||
dateformat@^4.6.3:
|
||||
version "4.6.3"
|
||||
resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-4.6.3.tgz#556fa6497e5217fedb78821424f8a1c22fa3f4b5"
|
||||
integrity sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==
|
||||
|
||||
detect-libc@^2.0.1:
|
||||
version "2.0.4"
|
||||
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.4.tgz#f04715b8ba815e53b4d8109655b6508a6865a7e8"
|
||||
integrity sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==
|
||||
|
||||
end-of-stream@^1.1.0:
|
||||
version "1.4.5"
|
||||
resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.5.tgz#7344d711dea40e0b74abc2ed49778743ccedb08c"
|
||||
integrity sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==
|
||||
dependencies:
|
||||
once "^1.4.0"
|
||||
|
||||
env-paths@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-3.0.0.tgz#2f1e89c2f6dbd3408e1b1711dd82d62e317f58da"
|
||||
integrity sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==
|
||||
|
||||
fast-copy@^3.0.2:
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/fast-copy/-/fast-copy-3.0.2.tgz#59c68f59ccbcac82050ba992e0d5c389097c9d35"
|
||||
integrity sha512-dl0O9Vhju8IrcLndv2eU4ldt1ftXMqqfgN4H1cpmGV7P6jeB9FwpN9a2c8DPGE1Ys88rNUJVYDHq73CGAGOPfQ==
|
||||
|
||||
fast-redact@^3.1.1:
|
||||
version "3.5.0"
|
||||
resolved "https://registry.yarnpkg.com/fast-redact/-/fast-redact-3.5.0.tgz#e9ea02f7e57d0cd8438180083e93077e496285e4"
|
||||
integrity sha512-dwsoQlS7h9hMeYUq1W++23NDcBLV4KqONnITDV9DjfS3q1SgDGVrBdvvTLUotWtPSD7asWDV9/CmsZPy8Hf70A==
|
||||
|
||||
fast-safe-stringify@^2.1.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz#c406a83b6e70d9e35ce3b30a81141df30aeba884"
|
||||
integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==
|
||||
|
||||
fast-zlib@2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/fast-zlib/-/fast-zlib-2.0.1.tgz#be624f592fc80ad8019ee2025d16a367a4e9b024"
|
||||
integrity sha512-DCoYgNagM2Bt1VIpXpdGnRx4LzqJeYG0oh6Nf/7cWo6elTXkFGMw9CrRCYYUIapYNrozYMoyDRflx9mgT3Awyw==
|
||||
|
||||
follow-redirects@^1.15.5:
|
||||
version "1.15.9"
|
||||
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.9.tgz#a604fa10e443bf98ca94228d9eebcc2e8a2c8ee1"
|
||||
integrity sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==
|
||||
|
||||
help-me@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/help-me/-/help-me-5.0.0.tgz#b1ebe63b967b74060027c2ac61f9be12d354a6f6"
|
||||
integrity sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg==
|
||||
|
||||
joycon@^3.1.1:
|
||||
version "3.1.1"
|
||||
resolved "https://registry.yarnpkg.com/joycon/-/joycon-3.1.1.tgz#bce8596d6ae808f8b68168f5fc69280996894f03"
|
||||
integrity sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==
|
||||
|
||||
minimist@^1.2.6:
|
||||
version "1.2.8"
|
||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c"
|
||||
integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==
|
||||
|
||||
msgpackr-extract@^3.0.2:
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/msgpackr-extract/-/msgpackr-extract-3.0.3.tgz#e9d87023de39ce714872f9e9504e3c1996d61012"
|
||||
integrity sha512-P0efT1C9jIdVRefqjzOQ9Xml57zpOXnIuS+csaB4MdZbTdmGDLo8XhzBG1N7aO11gKDDkJvBLULeFTo46wwreA==
|
||||
dependencies:
|
||||
node-gyp-build-optional-packages "5.2.2"
|
||||
optionalDependencies:
|
||||
"@msgpackr-extract/msgpackr-extract-darwin-arm64" "3.0.3"
|
||||
"@msgpackr-extract/msgpackr-extract-darwin-x64" "3.0.3"
|
||||
"@msgpackr-extract/msgpackr-extract-linux-arm" "3.0.3"
|
||||
"@msgpackr-extract/msgpackr-extract-linux-arm64" "3.0.3"
|
||||
"@msgpackr-extract/msgpackr-extract-linux-x64" "3.0.3"
|
||||
"@msgpackr-extract/msgpackr-extract-win32-x64" "3.0.3"
|
||||
|
||||
msgpackr@1.11.5:
|
||||
version "1.11.5"
|
||||
resolved "https://registry.yarnpkg.com/msgpackr/-/msgpackr-1.11.5.tgz#edf0b9d9cb7d8ed6897dd0e42cfb865a2f4b602e"
|
||||
integrity sha512-UjkUHN0yqp9RWKy0Lplhh+wlpdt9oQBYgULZOiFhV3VclSF1JnSQWZ5r9gORQlNYaUKQoR8itv7g7z1xDDuACA==
|
||||
optionalDependencies:
|
||||
msgpackr-extract "^3.0.2"
|
||||
|
||||
net-ipc@^2.2.2:
|
||||
version "2.2.2"
|
||||
resolved "https://registry.yarnpkg.com/net-ipc/-/net-ipc-2.2.2.tgz#2c5e6042f2a7c1f388ab86744b8c0f0c2b3eb173"
|
||||
integrity sha512-HGXL5ql3Moru1xaS79zEscXpoUyUwVy9arOplClKHDaEWfUaoyOtSLXLe1xUOHoyZ0aM61WtZg0TCYYRheYMvw==
|
||||
optionalDependencies:
|
||||
fast-zlib "2.0.1"
|
||||
msgpackr "1.11.5"
|
||||
|
||||
node-gyp-build-optional-packages@5.2.2:
|
||||
version "5.2.2"
|
||||
resolved "https://registry.yarnpkg.com/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.2.2.tgz#522f50c2d53134d7f3a76cd7255de4ab6c96a3a4"
|
||||
integrity sha512-s+w+rBWnpTMwSFbaE0UXsRlg7hU4FjekKU4eyAih5T8nJuNZT1nNsskXpxmeqSK9UzkBl6UgRlnKc8hz8IEqOw==
|
||||
dependencies:
|
||||
detect-libc "^2.0.1"
|
||||
|
||||
on-exit-leak-free@^2.1.0:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz#fed195c9ebddb7d9e4c3842f93f281ac8dadd3b8"
|
||||
integrity sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==
|
||||
|
||||
once@^1.3.1, once@^1.4.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
||||
integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==
|
||||
dependencies:
|
||||
wrappy "1"
|
||||
|
||||
pino-abstract-transport@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/pino-abstract-transport/-/pino-abstract-transport-2.0.0.tgz#de241578406ac7b8a33ce0d77ae6e8a0b3b68a60"
|
||||
integrity sha512-F63x5tizV6WCh4R6RHyi2Ml+M70DNRXt/+HANowMflpgGFMAym/VKm6G7ZOQRjqN7XbGxK1Lg9t6ZrtzOaivMw==
|
||||
dependencies:
|
||||
split2 "^4.0.0"
|
||||
|
||||
pino-pretty@^13.0.0:
|
||||
version "13.0.0"
|
||||
resolved "https://registry.yarnpkg.com/pino-pretty/-/pino-pretty-13.0.0.tgz#21d57fe940e34f2e279905d7dba2d7e2c4f9bf17"
|
||||
integrity sha512-cQBBIVG3YajgoUjo1FdKVRX6t9XPxwB9lcNJVD5GCnNM4Y6T12YYx8c6zEejxQsU0wrg9TwmDulcE9LR7qcJqA==
|
||||
dependencies:
|
||||
colorette "^2.0.7"
|
||||
dateformat "^4.6.3"
|
||||
fast-copy "^3.0.2"
|
||||
fast-safe-stringify "^2.1.1"
|
||||
help-me "^5.0.0"
|
||||
joycon "^3.1.1"
|
||||
minimist "^1.2.6"
|
||||
on-exit-leak-free "^2.1.0"
|
||||
pino-abstract-transport "^2.0.0"
|
||||
pump "^3.0.0"
|
||||
secure-json-parse "^2.4.0"
|
||||
sonic-boom "^4.0.1"
|
||||
strip-json-comments "^3.1.1"
|
||||
|
||||
pino-std-serializers@^7.0.0:
|
||||
version "7.0.0"
|
||||
resolved "https://registry.yarnpkg.com/pino-std-serializers/-/pino-std-serializers-7.0.0.tgz#7c625038b13718dbbd84ab446bd673dc52259e3b"
|
||||
integrity sha512-e906FRY0+tV27iq4juKzSYPbUj2do2X2JX4EzSca1631EB2QJQUqGbDuERal7LCtOpxl6x3+nvo9NPZcmjkiFA==
|
||||
|
||||
pino@^9.6.0:
|
||||
version "9.7.0"
|
||||
resolved "https://registry.yarnpkg.com/pino/-/pino-9.7.0.tgz#ff7cd86eb3103ee620204dbd5ca6ffda8b53f645"
|
||||
integrity sha512-vnMCM6xZTb1WDmLvtG2lE/2p+t9hDEIvTWJsu6FejkE62vB7gDhvzrpFR4Cw2to+9JNQxVnkAKVPA1KPB98vWg==
|
||||
dependencies:
|
||||
atomic-sleep "^1.0.0"
|
||||
fast-redact "^3.1.1"
|
||||
on-exit-leak-free "^2.1.0"
|
||||
pino-abstract-transport "^2.0.0"
|
||||
pino-std-serializers "^7.0.0"
|
||||
process-warning "^5.0.0"
|
||||
quick-format-unescaped "^4.0.3"
|
||||
real-require "^0.2.0"
|
||||
safe-stable-stringify "^2.3.1"
|
||||
sonic-boom "^4.0.1"
|
||||
thread-stream "^3.0.0"
|
||||
|
||||
process-warning@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/process-warning/-/process-warning-5.0.0.tgz#566e0bf79d1dff30a72d8bbbe9e8ecefe8d378d7"
|
||||
integrity sha512-a39t9ApHNx2L4+HBnQKqxxHNs1r7KF+Intd8Q/g1bUh6q0WIp9voPXJ/x0j+ZL45KF1pJd9+q2jLIRMfvEshkA==
|
||||
|
||||
pump@^3.0.0:
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.3.tgz#151d979f1a29668dc0025ec589a455b53282268d"
|
||||
integrity sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==
|
||||
dependencies:
|
||||
end-of-stream "^1.1.0"
|
||||
once "^1.3.1"
|
||||
|
||||
quick-format-unescaped@^4.0.3:
|
||||
version "4.0.4"
|
||||
resolved "https://registry.yarnpkg.com/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz#93ef6dd8d3453cbc7970dd614fad4c5954d6b5a7"
|
||||
integrity sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==
|
||||
|
||||
real-require@^0.2.0:
|
||||
version "0.2.0"
|
||||
resolved "https://registry.yarnpkg.com/real-require/-/real-require-0.2.0.tgz#209632dea1810be2ae063a6ac084fee7e33fba78"
|
||||
integrity sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==
|
||||
|
||||
safe-stable-stringify@^2.3.1:
|
||||
version "2.5.0"
|
||||
resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz#4ca2f8e385f2831c432a719b108a3bf7af42a1dd"
|
||||
integrity sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==
|
||||
|
||||
secure-json-parse@^2.4.0:
|
||||
version "2.7.0"
|
||||
resolved "https://registry.yarnpkg.com/secure-json-parse/-/secure-json-parse-2.7.0.tgz#5a5f9cd6ae47df23dba3151edd06855d47e09862"
|
||||
integrity sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==
|
||||
|
||||
sonic-boom@^4.0.1:
|
||||
version "4.2.0"
|
||||
resolved "https://registry.yarnpkg.com/sonic-boom/-/sonic-boom-4.2.0.tgz#e59a525f831210fa4ef1896428338641ac1c124d"
|
||||
integrity sha512-INb7TM37/mAcsGmc9hyyI6+QR3rR1zVRu36B0NeGXKnOOLiZOfER5SA+N7X7k3yUYRzLWafduTDvJAfDswwEww==
|
||||
dependencies:
|
||||
atomic-sleep "^1.0.0"
|
||||
|
||||
split2@^4.0.0:
|
||||
version "4.2.0"
|
||||
resolved "https://registry.yarnpkg.com/split2/-/split2-4.2.0.tgz#c9c5920904d148bab0b9f67145f245a86aadbfa4"
|
||||
integrity sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==
|
||||
|
||||
strip-json-comments@^3.1.1:
|
||||
version "3.1.1"
|
||||
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006"
|
||||
integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==
|
||||
|
||||
thread-stream@^3.0.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/thread-stream/-/thread-stream-3.1.0.tgz#4b2ef252a7c215064507d4ef70c05a5e2d34c4f1"
|
||||
integrity sha512-OqyPZ9u96VohAyMfJykzmivOrY2wfMSf3C5TtFJVgN+Hm6aj+voFhlK+kZEIv2FBh1X6Xp3DlnCOfEQ3B2J86A==
|
||||
dependencies:
|
||||
real-require "^0.2.0"
|
||||
|
||||
undici-types@~7.8.0:
|
||||
version "7.8.0"
|
||||
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.8.0.tgz#de00b85b710c54122e44fbfd911f8d70174cd294"
|
||||
integrity sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==
|
||||
|
||||
wrappy@1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
||||
integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==
|
|
@ -151,10 +151,7 @@ export class VideoWatchPage {
|
|||
await this.clickOnMoreDropdownIcon()
|
||||
|
||||
// We need the await expression
|
||||
// eslint-disable-next-line @typescript-eslint/await-thenable
|
||||
const items = await $$('.dropdown-menu.show .dropdown-item')
|
||||
|
||||
for (const item of items) {
|
||||
return $$('.dropdown-menu.show .dropdown-item').mapSeries(async item => {
|
||||
const content = await item.getText()
|
||||
|
||||
if (content.includes('Manage')) {
|
||||
|
@ -162,7 +159,7 @@ export class VideoWatchPage {
|
|||
await $('#name').waitForClickable()
|
||||
return
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
async clickOnMoreDropdownIcon () {
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
"module": "commonjs",
|
||||
"target": "ES2018",
|
||||
"typeRoots": [
|
||||
"../node_modules/@wdio",
|
||||
"../node_modules/@types",
|
||||
"../node_modules"
|
||||
],
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
"@ngx-loading-bar/http-client": "^7.0.0",
|
||||
"@ngx-loading-bar/router": "^7.0.0",
|
||||
"@peertube/maildev": "^1.2.0",
|
||||
"@peertube/player": "workspace:*",
|
||||
"@peertube/xliffmerge": "^2.0.3",
|
||||
"@plussub/srt-vtt-parser": "^2.0.5",
|
||||
"@popperjs/core": "^2.11.5",
|
||||
|
@ -70,6 +71,7 @@
|
|||
"@types/video.js": "^7.3.40",
|
||||
"@wdio/browserstack-service": "^9.12.7",
|
||||
"@wdio/cli": "^9.12.7",
|
||||
"@wdio/globals": "^9.17.0",
|
||||
"@wdio/local-runner": "^9.12.7",
|
||||
"@wdio/mocha-framework": "^9.12.6",
|
||||
"@wdio/shared-store-service": "^9.12.7",
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
import 'zone.js'
|
||||
|
||||
;(window as any).global = window
|
||||
;(window as any).process = require('process/')
|
||||
;(window as any).Buffer = require('buffer/').Buffer
|
||||
|
||||
import '@angular/localize/init'
|
||||
|
|
10139
client/yarn.lock
10139
client/yarn.lock
File diff suppressed because it is too large
Load diff
24
package.json
24
package.json
|
@ -6,7 +6,7 @@
|
|||
"licence": "AGPL-3.0",
|
||||
"engines": {
|
||||
"node": ">=20.x",
|
||||
"yarn": ">=1.x"
|
||||
"pnpm": ">=10.9"
|
||||
},
|
||||
"type": "module",
|
||||
"author": {
|
||||
|
@ -19,12 +19,8 @@
|
|||
"url": "git+https://github.com/Chocobozzz/PeerTube.git"
|
||||
},
|
||||
"typings": "*.d.ts",
|
||||
"workspaces": [
|
||||
"packages/*",
|
||||
"server"
|
||||
],
|
||||
"scripts": {
|
||||
"install-node-dependencies": "yarn install --pure-lockfile",
|
||||
"install-node-dependencies": "pnpm install --frozen-lockfile",
|
||||
"benchmark-server": "tsx --conditions=peertube:tsx ./scripts/benchmark.ts",
|
||||
"benchmark-transcription": "tsx --conditions=peertube:tsx --tsconfig ./packages/transcription/tsconfig.json ./packages/transcription/src/benchmark.ts",
|
||||
"build:client": "bash ./scripts/build/client.sh",
|
||||
|
@ -67,7 +63,6 @@
|
|||
"parse-log": "node ./dist/scripts/parse-log.js",
|
||||
"plugin:install": "node ./dist/scripts/plugin/install.js",
|
||||
"plugin:uninstall": "node ./dist/scripts/plugin/uninstall.js",
|
||||
"postinstall": "test -n \"$NOCLIENT\" || (cd client && yarn install --pure-lockfile)",
|
||||
"prune-storage": "LOGGER_LEVEL=warn node ./dist/scripts/prune-storage.js",
|
||||
"regenerate-thumbnails": "node ./dist/scripts/regenerate-thumbnails.js",
|
||||
"release-embed-api": "bash ./scripts/release-embed-api.sh",
|
||||
|
@ -99,6 +94,7 @@
|
|||
"@aws-sdk/lib-storage": "^3.190.0",
|
||||
"@aws-sdk/s3-request-presigner": "^3.345.0",
|
||||
"@commander-js/extra-typings": "^13.1.0",
|
||||
"@jimp/plugin-color": "^1.6.0",
|
||||
"@node-oauth/oauth2-server": "^5.1.0",
|
||||
"@opentelemetry/api": "^1.1.0",
|
||||
"@opentelemetry/exporter-jaeger": "^2.0.0",
|
||||
|
@ -118,9 +114,18 @@
|
|||
"@peertube/bittorrent-tracker-server": "^11.1.2",
|
||||
"@peertube/feed": "^5.4.1",
|
||||
"@peertube/http-signature": "^1.7.0",
|
||||
"@peertube/peertube-core-utils": "workspace:*",
|
||||
"@peertube/peertube-ffmpeg": "workspace:*",
|
||||
"@peertube/peertube-models": "workspace:*",
|
||||
"@peertube/peertube-node-utils": "workspace:*",
|
||||
"@peertube/peertube-server-commands": "workspace:*",
|
||||
"@peertube/peertube-transcription": "workspace:*",
|
||||
"@peertube/peertube-typescript-utils": "workspace:*",
|
||||
"@smithy/node-http-handler": "^4.0.2",
|
||||
"@types/parse-torrent": "^5.8.7",
|
||||
"@uploadx/core": "^6.1.8",
|
||||
"archiver": "^7.0.1",
|
||||
"async": "^3.2.6",
|
||||
"async-mutex": "^0.5.0",
|
||||
"bcrypt": "5.1.1",
|
||||
"bencode": "^4.0.0",
|
||||
|
@ -212,6 +217,7 @@
|
|||
"@types/config": "^3.3.0",
|
||||
"@types/create-torrent": "^5.0.0",
|
||||
"@types/express": "4.17.9",
|
||||
"@types/express-serve-static-core": "4.19.5",
|
||||
"@types/fluent-ffmpeg": "^2.1.16",
|
||||
"@types/fs-extra": "^11.0.1",
|
||||
"@types/jsonld": "^1.5.9",
|
||||
|
@ -227,7 +233,6 @@
|
|||
"@types/node": "22.14.1",
|
||||
"@types/nodemailer": "^6.2.0",
|
||||
"@types/pug": "^2.0.10",
|
||||
"@types/supertest": "^6.0.2",
|
||||
"@types/validator": "^13.9.0",
|
||||
"@types/webtorrent": "^0.110.0",
|
||||
"@types/ws": "^8.2.0",
|
||||
|
@ -254,7 +259,6 @@
|
|||
"rollup": "^4.20.0",
|
||||
"rollup-plugin-dts": "^6.1.1",
|
||||
"socket.io-client": "^4.5.4",
|
||||
"supertest": "^7.0.0",
|
||||
"swagger-cli": "^4.0.2",
|
||||
"tsc-watch": "^6.0.0",
|
||||
"tsx": "^4.7.1",
|
||||
|
@ -262,5 +266,5 @@
|
|||
"typescript": "~5.8.3",
|
||||
"ua-parser-js": "^2.0.1"
|
||||
},
|
||||
"packageManager": "yarn@1.22.21+sha1.1959a18351b811cdeedbd484a8f86c3cc3bbaf72"
|
||||
"packageManager": "pnpm@10.15.1+sha512.34e538c329b5553014ca8e8f4535997f96180a1d0f614339357449935350d924e22f8614682191264ec33d1462ac21561aff97f6bb18065351c162c7e8f6de67"
|
||||
}
|
||||
|
|
|
@ -3,17 +3,28 @@
|
|||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"main": "dist/index.js",
|
||||
"files": [ "dist" ],
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"exports": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"peertube:tsx": "./src/index.ts",
|
||||
"default": "./dist/index.js"
|
||||
},
|
||||
"type": "module",
|
||||
"devDependencies": {},
|
||||
"devDependencies": {
|
||||
"@types/superagent": "^8.1.9",
|
||||
"@types/supertest": "^6.0.3",
|
||||
"supertest": "^7.1.4"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"watch": "tsc -w"
|
||||
},
|
||||
"dependencies": {}
|
||||
"dependencies": {
|
||||
"@peertube/peertube-core-utils": "workspace:*",
|
||||
"@peertube/peertube-models": "workspace:*",
|
||||
"@peertube/peertube-node-utils": "workspace:*",
|
||||
"@peertube/peertube-typescript-utils": "workspace:*"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,20 +2,19 @@ import { io } from 'socket.io-client'
|
|||
import { AbstractCommand, OverrideCommandOptions } from '../shared/index.js'
|
||||
|
||||
export class SocketIOCommand extends AbstractCommand {
|
||||
|
||||
getUserNotificationSocket (options: OverrideCommandOptions = {}) {
|
||||
getUserNotificationSocket (options: OverrideCommandOptions = {}): ReturnType<typeof io> {
|
||||
return io(this.server.url + '/user-notifications', {
|
||||
query: { accessToken: options.token ?? this.server.accessToken }
|
||||
})
|
||||
}
|
||||
|
||||
getLiveNotificationSocket () {
|
||||
getLiveNotificationSocket (): ReturnType<typeof io> {
|
||||
return io(this.server.url + '/live-videos')
|
||||
}
|
||||
|
||||
getRunnersSocket (options: {
|
||||
runnerToken: string
|
||||
}) {
|
||||
}): ReturnType<typeof io> {
|
||||
return io(this.server.url + '/runners', {
|
||||
reconnection: false,
|
||||
auth: { runnerToken: options.runnerToken }
|
||||
|
|
|
@ -3,11 +3,16 @@
|
|||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"devDependencies": {},
|
||||
"devDependencies": {
|
||||
"@peertube/peertube-server": "workspace:*",
|
||||
"@peertube/peertube-transcription-devtools": "workspace:*",
|
||||
"@types/superagent": "^8.1.9",
|
||||
"@types/supertest": "^6.0.3",
|
||||
"supertest": "^7.1.4"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"watch": "tsc -w",
|
||||
"install-dependencies:transcription": "pip install -r ./requirements.txt -r ../transcription-devtools/requirements.txt"
|
||||
},
|
||||
"dependencies": {}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -379,7 +379,6 @@ describe('Test plugins', function () {
|
|||
await wait(3000)
|
||||
|
||||
expect(await pathExists(join(baseNativeModule, 'build'))).to.be.true
|
||||
expect(await pathExists(join(baseNativeModule, 'prebuilds'))).to.be.true
|
||||
|
||||
await makeGetRequest({
|
||||
url: server.url,
|
||||
|
@ -393,7 +392,6 @@ describe('Test plugins', function () {
|
|||
await server.run()
|
||||
|
||||
expect(await pathExists(join(baseNativeModule, 'build'))).to.be.false
|
||||
expect(await pathExists(join(baseNativeModule, 'prebuilds'))).to.be.false
|
||||
|
||||
await makeGetRequest({
|
||||
url: server.url,
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
import { VideoFile } from '@peertube/peertube-models'
|
||||
import { PeerTubeServer } from '@peertube/peertube-server-commands'
|
||||
import { OverloadedParameters } from '@peertube/peertube-typescript-utils'
|
||||
import { expect } from 'chai'
|
||||
import { readFile } from 'fs/promises'
|
||||
import type { Instance as MagnetUriInstance } from 'magnet-uri'
|
||||
import type { ParseTorrent } from 'parse-torrent'
|
||||
import { basename, join } from 'path'
|
||||
import type { Torrent } from 'webtorrent'
|
||||
import WebTorrent from 'webtorrent'
|
||||
|
@ -32,7 +34,7 @@ export async function checkWebTorrentWorks (magnetUri: string, pathMatch?: RegEx
|
|||
webtorrent.destroy()
|
||||
}
|
||||
|
||||
export async function parseTorrentVideo (server: PeerTubeServer, file: VideoFile) {
|
||||
export async function parseTorrentVideo (server: PeerTubeServer, file: VideoFile): Promise<OverloadedParameters<ReturnType<ParseTorrent>>> {
|
||||
const torrentName = basename(file.torrentUrl)
|
||||
const torrentPath = server.servers.buildDirectory(join('torrents', torrentName))
|
||||
|
||||
|
|
|
@ -9,11 +9,6 @@ Npm:
|
|||
npm install --save-dev @peertube/peertube-types
|
||||
```
|
||||
|
||||
Yarn:
|
||||
```
|
||||
yarn add --dev @peertube/peertube-types
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
> See [contribute-plugins](https://docs.joinpeertube.org/contribute/plugins#typescript) **Typescript** section of the doc.
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@peertube/peertube-core-utils": "*"
|
||||
"@peertube/peertube-core-utils": "workspace:*"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,23 +20,19 @@ export type PickWithOpt<T, KT extends keyof T, V> = {
|
|||
|
||||
// https://github.com/krzkaczor/ts-essentials Rocks!
|
||||
export type DeepPartial<T> = {
|
||||
[P in keyof T]?: T[P] extends Array<infer U>
|
||||
? Array<DeepPartial<U>>
|
||||
: T[P] extends ReadonlyArray<infer U>
|
||||
? ReadonlyArray<DeepPartial<U>>
|
||||
: DeepPartial<T[P]>
|
||||
[P in keyof T]?: T[P] extends Array<infer U> ? Array<DeepPartial<U>>
|
||||
: T[P] extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
||||
: DeepPartial<T[P]>
|
||||
}
|
||||
|
||||
type Primitive = string | Function | number | boolean | symbol | undefined | null
|
||||
export type DeepOmitHelper<T, K extends keyof T> = {
|
||||
[P in K]: // extra level of indirection needed to trigger homomorhic behavior
|
||||
T[P] extends infer TP // distribute over unions
|
||||
? TP extends Primitive
|
||||
? TP // leave primitives and functions alone
|
||||
: TP extends any[]
|
||||
? DeepOmitArray<TP, K> // Array special handling
|
||||
: DeepOmit<TP, K>
|
||||
: never
|
||||
T[P] extends infer TP // distribute over unions
|
||||
? TP extends Primitive ? TP // leave primitives and functions alone
|
||||
: TP extends any[] ? DeepOmitArray<TP, K> // Array special handling
|
||||
: DeepOmit<TP, K>
|
||||
: never
|
||||
}
|
||||
export type DeepOmit<T, K> = T extends Primitive ? T : DeepOmitHelper<T, Exclude<keyof T, K>>
|
||||
|
||||
|
@ -47,3 +43,12 @@ export type DeepOmitArray<T extends any[], K> = {
|
|||
export type Unpacked<T> = T extends (infer U)[] ? U : T
|
||||
|
||||
export type Awaitable<T> = T | PromiseLike<T>
|
||||
|
||||
// Thanks https://stackoverflow.com/a/52761156
|
||||
export type OverloadedParameters<T> =
|
||||
// eslint-disable-next-line max-len
|
||||
T extends { (...args: infer A1): any, (...args: infer A2): any, (...args: infer A3): any, (...args: infer A4): any } ? A1 | A2 | A3 | A4 :
|
||||
T extends { (...args: infer A1): any, (...args: infer A2): any, (...args: infer A3): any } ? A1 | A2 | A3 :
|
||||
T extends { (...args: infer A1): any, (...args: infer A2): any } ? A1 | A2 :
|
||||
T extends (...args: infer A) => any ? A
|
||||
: any
|
||||
|
|
23565
pnpm-lock.yaml
generated
Normal file
23565
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load diff
22
pnpm-workspace.yaml
Normal file
22
pnpm-workspace.yaml
Normal file
|
@ -0,0 +1,22 @@
|
|||
packages:
|
||||
- packages/*
|
||||
- apps/*
|
||||
- server
|
||||
- client
|
||||
- client/packages/*
|
||||
- client/src/standalone/player
|
||||
|
||||
onlyBuiltDependencies:
|
||||
- '@parcel/watcher'
|
||||
- bcrypt
|
||||
- bufferutil
|
||||
- core-js
|
||||
- edgedriver
|
||||
- es5-ext
|
||||
- esbuild
|
||||
- geckodriver
|
||||
- lmdb
|
||||
- msgpackr-extract
|
||||
- node-datachannel
|
||||
- utf-8-validate
|
||||
- utp-native
|
|
@ -61,7 +61,7 @@ if [ -z ${1+x} ] || ([ "$1" != "--light" ] && [ "$1" != "--analyze-bundle" ]); t
|
|||
additionalParams="--source-map=true"
|
||||
fi
|
||||
|
||||
node --max_old_space_size=8192 node_modules/.bin/ng build --configuration production --output-path "dist/build" $additionalParams
|
||||
NODE_OPTIONS=--max_old_space_size=8192 node_modules/.bin/ng build --configuration production --output-path "dist/build" $additionalParams
|
||||
|
||||
for key in "${!languages[@]}"; do
|
||||
lang=${languages[$key]}
|
||||
|
@ -86,7 +86,7 @@ else
|
|||
export ANALYZE_BUNDLE=true
|
||||
fi
|
||||
|
||||
node --max_old_space_size=8192 node_modules/.bin/ng build --localize=false --output-path "dist/$defaultLanguage/" \
|
||||
NODE_OPTIONS=--max_old_space_size=8192 node_modules/.bin/ng build --localize=false --output-path "dist/$defaultLanguage/" \
|
||||
--configuration production --stats-json $additionalParams
|
||||
fi
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ elif [ "$1" = "lint" ]; then
|
|||
|
||||
( cd client && npm run lint )
|
||||
elif [ "$1" = "transcription" ]; then
|
||||
npm run install-dependencies:transcription --workspace=@peertube/tests
|
||||
pnpm run --filter=@peertube/tests install-dependencies:transcription
|
||||
|
||||
npm run build:server
|
||||
npm run build:tests
|
||||
|
|
|
@ -11,17 +11,17 @@ if [ ! -z ${2+x} ] && [ "$2" = "--ar-locale" ]; then
|
|||
fi
|
||||
|
||||
embedCommand="cd client/src/standalone/player && npm run dev"
|
||||
clientCommand="cd client && node --max_old_space_size=4096 node_modules/.bin/ng serve --proxy-config proxy.config.json --hmr --configuration $clientConfiguration --host 0.0.0.0 --port 3000"
|
||||
clientCommand="cd client && NODE_OPTIONS=--max_old_space_size=8192 node_modules/.bin/ng serve --proxy-config proxy.config.json --hmr --configuration $clientConfiguration --host 0.0.0.0 --port 3000"
|
||||
serverCommand="NODE_ENV=dev node dist/server"
|
||||
|
||||
if [ ! -z ${1+x} ] && [ "$1" = "--skip-server" ]; then
|
||||
node node_modules/.bin/concurrently -k \
|
||||
node_modules/.bin/concurrently -k \
|
||||
"$embedCommand" \
|
||||
"$clientCommand"
|
||||
else
|
||||
npm run build:server
|
||||
|
||||
node node_modules/.bin/concurrently -k \
|
||||
node_modules/.bin/concurrently -k \
|
||||
"$embedCommand" \
|
||||
"$clientCommand" \
|
||||
"$serverCommand"
|
||||
|
|
|
@ -41,13 +41,13 @@ sed -i 's/"version": "\([^"]\+\)"/"version": "\1-'"$nightly_version"'"/' ./packa
|
|||
"$directory_name/packages/node-utils/dist/" "$directory_name/packages/node-utils/package.json" \
|
||||
"$directory_name/packages/models/dist/" "$directory_name/packages/models/package.json" \
|
||||
"$directory_name/packages/transcription/dist/" "$directory_name/packages/transcription/package.json" \
|
||||
"$directory_name/client/dist/" "$directory_name/client/yarn.lock" \
|
||||
"$directory_name/client/dist/" \
|
||||
"$directory_name/client/package.json" "$directory_name/config" \
|
||||
"$directory_name/dist" "$directory_name/package.json" \
|
||||
"$directory_name/scripts/upgrade.sh" "$directory_name/support/doc" "$directory_name/support/freebsd" \
|
||||
"$directory_name/support/init.d" "$directory_name/support/nginx" "$directory_name/support/openapi" \
|
||||
"$directory_name/support/sysctl.d" "$directory_name/support/systemd" \
|
||||
"$directory_name/yarn.lock")
|
||||
"$directory_name/pnpm-lock.yaml" "$directory_name/pnpm-workspace.yaml")
|
||||
|
||||
# temporary setup
|
||||
cd ..
|
||||
|
|
|
@ -34,8 +34,7 @@ if [ "$branch" != "develop" ] && [[ "$branch" != release/* ]]; then
|
|||
exit -1
|
||||
fi
|
||||
|
||||
yarn check --integrity --verify-tree
|
||||
(cd client && yarn check --integrity --verify-tree)
|
||||
pnpm install --frozen-lockfile
|
||||
|
||||
version="v$1"
|
||||
github_prerelease_option=""
|
||||
|
@ -89,13 +88,13 @@ find dist/ packages/core-utils/dist/ \
|
|||
"$directory_name/packages/node-utils/dist/" "$directory_name/packages/node-utils/package.json" \
|
||||
"$directory_name/packages/models/dist/" "$directory_name/packages/models/package.json" \
|
||||
"$directory_name/packages/transcription/dist/" "$directory_name/packages/transcription/package.json" \
|
||||
"$directory_name/client/dist/" "$directory_name/client/yarn.lock" \
|
||||
"$directory_name/client/dist/" \
|
||||
"$directory_name/client/package.json" "$directory_name/config" \
|
||||
"$directory_name/dist" "$directory_name/package.json" \
|
||||
"$directory_name/scripts/upgrade.sh" "$directory_name/support/doc" "$directory_name/support/freebsd" \
|
||||
"$directory_name/support/init.d" "$directory_name/support/nginx" "$directory_name/support/openapi" \
|
||||
"$directory_name/support/sysctl.d" "$directory_name/support/systemd" \
|
||||
"$directory_name/yarn.lock")
|
||||
"$directory_name/pnpm-lock.yaml" "$directory_name/pnpm-workspace.yaml")
|
||||
|
||||
# temporary setup
|
||||
cd ..
|
||||
|
|
|
@ -110,7 +110,7 @@ async function jimpProcessor (options: {
|
|||
}
|
||||
}
|
||||
|
||||
async function autoResize (options: {
|
||||
function autoResize (options: {
|
||||
sourceImage: Jimp
|
||||
newSize: { width: number, height: number }
|
||||
destination: string
|
||||
|
|
|
@ -33,11 +33,11 @@ const consoleLoggerFormat = format.printf(info => {
|
|||
return `[${info.label}] ${info.timestamp} ${info.level}: ${info.message}${additionalInfos}`
|
||||
})
|
||||
|
||||
export const jsonLoggerFormat = format.printf(info => {
|
||||
export const jsonLoggerFormat: ReturnType<typeof format.printf> = format.printf(info => {
|
||||
return JSON.stringify(info, removeCyclicValues())
|
||||
})
|
||||
|
||||
export const labelFormatter = (suffix?: string) => {
|
||||
export const labelFormatter: (suffix?: string) => ReturnType<typeof format.printf> = (suffix?: string) => {
|
||||
return format.label({
|
||||
label: suffix ? `${label} ${suffix}` : label
|
||||
})
|
||||
|
|
|
@ -15,6 +15,7 @@ import { applicationExist, clientsExist, usersExist } from './checker-after-init
|
|||
import { CONFIG } from './config.js'
|
||||
import { DIRECTORIES, FILES_CACHE, LAST_MIGRATION_VERSION } from './constants.js'
|
||||
import { sequelizeTypescript } from './database.js'
|
||||
import { initPNPM } from '@server/lib/plugins/package-manager.js'
|
||||
|
||||
async function installApplication () {
|
||||
try {
|
||||
|
@ -26,7 +27,8 @@ async function installApplication () {
|
|||
createApplicationIfNotExist(),
|
||||
createOAuthClientIfNotExist(),
|
||||
createOAuthAdminIfNotExist(),
|
||||
createRunnerRegistrationTokenIfNotExist()
|
||||
createRunnerRegistrationTokenIfNotExist(),
|
||||
initPNPM()
|
||||
])
|
||||
}),
|
||||
|
||||
|
@ -81,7 +83,7 @@ async function removeDirectoryOrContent (dir: string) {
|
|||
function createDirectoriesIfNotExist () {
|
||||
const storage = CONFIG.STORAGE
|
||||
const cacheDirectories = Object.keys(FILES_CACHE)
|
||||
.map(k => FILES_CACHE[k].DIRECTORY)
|
||||
.map(k => FILES_CACHE[k].DIRECTORY)
|
||||
|
||||
const tasks: Promise<void>[] = []
|
||||
for (const key of Object.keys(storage)) {
|
||||
|
|
|
@ -1,18 +1,16 @@
|
|||
import { mapToJSON } from '@server/helpers/core-utils.js'
|
||||
import { logger, loggerTagsFactory } from '@server/helpers/logger.js'
|
||||
import { MStreamingPlaylistVideo } from '@server/types/models/index.js'
|
||||
import { writeJson } from 'fs-extra/esm'
|
||||
import { rename } from 'fs/promises'
|
||||
import PQueue from 'p-queue'
|
||||
import { basename } from 'path'
|
||||
import { mapToJSON } from '@server/helpers/core-utils.js'
|
||||
import { logger, loggerTagsFactory } from '@server/helpers/logger.js'
|
||||
import { MStreamingPlaylistVideo } from '@server/types/models/index.js'
|
||||
import { buildSha256Segment } from '../hls.js'
|
||||
import { storeHLSFileFromPath } from '../object-storage/index.js'
|
||||
import { JFWriteOptions } from 'jsonfile'
|
||||
|
||||
const lTags = loggerTagsFactory('live')
|
||||
|
||||
class LiveSegmentShaStore {
|
||||
|
||||
private readonly segmentsSha256 = new Map<string, string>()
|
||||
|
||||
private readonly videoUUID: string
|
||||
|
@ -62,7 +60,9 @@ class LiveSegmentShaStore {
|
|||
if (!this.segmentsSha256.has(segmentName)) {
|
||||
logger.warn(
|
||||
'Unknown segment in live segment hash store for video %s and segment %s.',
|
||||
this.videoUUID, segmentPath, lTags(this.videoUUID)
|
||||
this.videoUUID,
|
||||
segmentPath,
|
||||
lTags(this.videoUUID)
|
||||
)
|
||||
return
|
||||
}
|
||||
|
@ -77,7 +77,8 @@ class LiveSegmentShaStore {
|
|||
logger.debug(`Writing segment sha JSON ${this.sha256Path} of ${this.videoUUID} on disk.`, lTags(this.videoUUID))
|
||||
|
||||
// Atomic write: use rename instead of move that is not atomic
|
||||
await writeJson(this.sha256PathTMP, mapToJSON(this.segmentsSha256), { flush: true } as JFWriteOptions) // FIXME: jsonfile typings
|
||||
// FIXME: jsonfile typings
|
||||
await (writeJson(this.sha256PathTMP, mapToJSON(this.segmentsSha256), { flush: true } as any) as unknown as Promise<void>)
|
||||
await rename(this.sha256PathTMP, this.sha256Path)
|
||||
|
||||
if (this.sendToObjectStorage) {
|
||||
|
|
89
server/core/lib/plugins/package-manager.ts
Normal file
89
server/core/lib/plugins/package-manager.ts
Normal file
|
@ -0,0 +1,89 @@
|
|||
import { isStableOrUnstableVersionValid } from '@server/helpers/custom-validators/misc.js'
|
||||
import { outputJSON, pathExists, remove } from 'fs-extra/esm'
|
||||
import { writeFile } from 'fs/promises'
|
||||
import { join } from 'path'
|
||||
import { execShell } from '../../helpers/core-utils.js'
|
||||
import { isNpmPluginNameValid } from '../../helpers/custom-validators/plugins.js'
|
||||
import { logger } from '../../helpers/logger.js'
|
||||
import { CONFIG } from '../../initializers/config.js'
|
||||
import { getLatestPluginVersion } from './plugin-index.js'
|
||||
|
||||
export async function installNpmPlugin (npmName: string, versionArg?: string) {
|
||||
// Security check
|
||||
checkNpmPluginNameOrThrow(npmName)
|
||||
if (versionArg) checkPluginVersionOrThrow(versionArg)
|
||||
|
||||
const version = versionArg || await getLatestPluginVersion(npmName)
|
||||
|
||||
let toInstall = npmName
|
||||
if (version) toInstall += `@${version}`
|
||||
|
||||
const { stdout } = await execPNPM('add ' + toInstall)
|
||||
|
||||
logger.debug('Added a pnpm package.', { stdout })
|
||||
}
|
||||
|
||||
export async function installNpmPluginFromDisk (path: string) {
|
||||
await execPNPM('add file:' + path)
|
||||
}
|
||||
|
||||
export async function removeNpmPlugin (name: string) {
|
||||
checkNpmPluginNameOrThrow(name)
|
||||
|
||||
await execPNPM('remove ' + name)
|
||||
}
|
||||
|
||||
export async function rebuildNativePlugins () {
|
||||
await execPNPM('rebuild')
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
async function execPNPM (command: string) {
|
||||
try {
|
||||
const pluginDirectory = CONFIG.STORAGE.PLUGINS_DIR
|
||||
|
||||
return execShell(`pnpm ${command}`, { cwd: pluginDirectory })
|
||||
} catch (result) {
|
||||
logger.error('Cannot exec pnpm.', { command, err: result.err, stderr: result.stderr })
|
||||
|
||||
throw result.err as Error
|
||||
}
|
||||
}
|
||||
|
||||
function checkNpmPluginNameOrThrow (name: string) {
|
||||
if (!isNpmPluginNameValid(name)) throw new Error('Invalid NPM plugin name to install')
|
||||
}
|
||||
|
||||
function checkPluginVersionOrThrow (name: string) {
|
||||
if (!isStableOrUnstableVersionValid(name)) throw new Error('Invalid NPM plugin version to install')
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export async function initPNPM () {
|
||||
const pluginDirectory = CONFIG.STORAGE.PLUGINS_DIR
|
||||
|
||||
const pluginPackageJSON = join(pluginDirectory, 'package.json')
|
||||
|
||||
// Create empty package.json file if needed
|
||||
if (!await pathExists(pluginPackageJSON)) {
|
||||
logger.info('Init package.json in plugin directory')
|
||||
|
||||
await outputJSON(pluginPackageJSON, {})
|
||||
}
|
||||
|
||||
const pnpmWorkspace = join(pluginDirectory, 'pnpm-workspace.yaml')
|
||||
if (!await pathExists(pnpmWorkspace)) {
|
||||
logger.info('Init pnpm-workspace.yaml in plugin directory')
|
||||
|
||||
await writeFile(pnpmWorkspace, 'dangerouslyAllowAllBuilds: true\nnodeLinker: hoisted\n')
|
||||
}
|
||||
|
||||
if (await pathExists(join(pluginDirectory, 'yarn.lock'))) {
|
||||
logger.info('Migrate from yarn.lock in plugin directory')
|
||||
|
||||
await execPNPM('import yarn.lock')
|
||||
await remove(join(pluginDirectory, 'yarn.lock'))
|
||||
}
|
||||
}
|
|
@ -32,7 +32,7 @@ import {
|
|||
} from '../../types/plugins/index.js'
|
||||
import { ClientHtml } from '../html/client-html.js'
|
||||
import { RegisterHelpers } from './register-helpers.js'
|
||||
import { installNpmPlugin, installNpmPluginFromDisk, rebuildNativePlugins, removeNpmPlugin } from './yarn.js'
|
||||
import { installNpmPlugin, installNpmPluginFromDisk, rebuildNativePlugins, removeNpmPlugin } from './package-manager.js'
|
||||
|
||||
const require = createRequire(import.meta.url)
|
||||
|
||||
|
@ -452,6 +452,8 @@ export class PluginManager implements ServerHook {
|
|||
async rebuildNativePluginsIfNeeded () {
|
||||
if (!await ApplicationModel.nodeABIChanged()) return
|
||||
|
||||
logger.info('Node ABI has changed, rebuilding native plugins')
|
||||
|
||||
return rebuildNativePlugins()
|
||||
}
|
||||
|
||||
|
|
|
@ -1,65 +0,0 @@
|
|||
import { isStableOrUnstableVersionValid } from '@server/helpers/custom-validators/misc.js'
|
||||
import { outputJSON, pathExists } from 'fs-extra/esm'
|
||||
import { join } from 'path'
|
||||
import { execShell } from '../../helpers/core-utils.js'
|
||||
import { isNpmPluginNameValid } from '../../helpers/custom-validators/plugins.js'
|
||||
import { logger } from '../../helpers/logger.js'
|
||||
import { CONFIG } from '../../initializers/config.js'
|
||||
import { getLatestPluginVersion } from './plugin-index.js'
|
||||
|
||||
export async function installNpmPlugin (npmName: string, versionArg?: string) {
|
||||
// Security check
|
||||
checkNpmPluginNameOrThrow(npmName)
|
||||
if (versionArg) checkPluginVersionOrThrow(versionArg)
|
||||
|
||||
const version = versionArg || await getLatestPluginVersion(npmName)
|
||||
|
||||
let toInstall = npmName
|
||||
if (version) toInstall += `@${version}`
|
||||
|
||||
const { stdout } = await execYarn('add ' + toInstall)
|
||||
|
||||
logger.debug('Added a yarn package.', { yarnStdout: stdout })
|
||||
}
|
||||
|
||||
export async function installNpmPluginFromDisk (path: string) {
|
||||
await execYarn('add file:' + path)
|
||||
}
|
||||
|
||||
export async function removeNpmPlugin (name: string) {
|
||||
checkNpmPluginNameOrThrow(name)
|
||||
|
||||
await execYarn('remove ' + name)
|
||||
}
|
||||
|
||||
export async function rebuildNativePlugins () {
|
||||
await execYarn('install --pure-lockfile')
|
||||
}
|
||||
|
||||
// ############################################################################
|
||||
|
||||
async function execYarn (command: string) {
|
||||
try {
|
||||
const pluginDirectory = CONFIG.STORAGE.PLUGINS_DIR
|
||||
const pluginPackageJSON = join(pluginDirectory, 'package.json')
|
||||
|
||||
// Create empty package.json file if needed
|
||||
if (!await pathExists(pluginPackageJSON)) {
|
||||
await outputJSON(pluginPackageJSON, {})
|
||||
}
|
||||
|
||||
return execShell(`yarn ${command}`, { cwd: pluginDirectory })
|
||||
} catch (result) {
|
||||
logger.error('Cannot exec yarn.', { command, err: result.err, stderr: result.stderr })
|
||||
|
||||
throw result.err as Error
|
||||
}
|
||||
}
|
||||
|
||||
function checkNpmPluginNameOrThrow (name: string) {
|
||||
if (!isNpmPluginNameValid(name)) throw new Error('Invalid NPM plugin name to install')
|
||||
}
|
||||
|
||||
function checkPluginVersionOrThrow (name: string) {
|
||||
if (!isStableOrUnstableVersionValid(name)) throw new Error('Invalid NPM plugin version to install')
|
||||
}
|
|
@ -2,14 +2,14 @@
|
|||
"name": "@peertube/peertube-server",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"files": [ "dist" ],
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"type": "module",
|
||||
"exports": {
|
||||
"./*": {
|
||||
"peertube:tsx": "./*",
|
||||
"default": "./dist/*"
|
||||
}
|
||||
},
|
||||
"devDependencies": {},
|
||||
"dependencies": {}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ RELEASE_PAGE_URL="https://github.com/Chocobozzz/PeerTube/releases/tag/${VERSION}
|
|||
LATEST_VERSION_DIRECTORY="$PEERTUBE_PATH/versions/peertube-${VERSION}"
|
||||
cd "$LATEST_VERSION_DIRECTORY"
|
||||
|
||||
NOCLIENT=1 npm run install-node-dependencies -- --production
|
||||
npm run install-node-dependencies -- --production
|
||||
|
||||
OLD_VERSION_DIRECTORY=$(readlink "$PEERTUBE_PATH/peertube-latest")
|
||||
|
||||
|
|
|
@ -11,10 +11,10 @@ For instance, the playground URL for the above embed URL is `https://my-instance
|
|||
## Quick Start
|
||||
|
||||
Given an existing PeerTube embed `<iframe>` **with API enabled** (`https://my-instance.example.com/videos/embed/52a10666-3a18-4e73-93da-e8d3c12c305a?api=1`),
|
||||
one can use the PeerTube Embed API to control it by first including the library. You can include it via Yarn with:
|
||||
one can use the PeerTube Embed API to control it by first including the library. You can include it via NPM with:
|
||||
|
||||
```
|
||||
yarn add @peertube/embed-api
|
||||
npm install @peertube/embed-api
|
||||
```
|
||||
|
||||
Now just use the `PeerTubePlayer` class exported by the module:
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
Main dependencies supported by PeerTube:
|
||||
|
||||
* `node` LTS (>= 20.17 or 22.x)
|
||||
* `yarn` 1.x (**must not be >=2.x**)
|
||||
* `yarn` 1.x for PeerTube <= 7.3 or `pnpm` >= 10.x for PeerTube next
|
||||
* `pnpm` >= 10.x for PeerTube next
|
||||
* `postgres` >=10.x
|
||||
* `redis-server` >=6.x
|
||||
* `ffmpeg` >=4.3 (using a ffmpeg static build [is not recommended](https://github.com/Chocobozzz/PeerTube/issues/6308))
|
||||
|
@ -15,58 +16,47 @@ Main dependencies supported by PeerTube:
|
|||
|
||||
_note_: only **LTS** versions of external dependencies are supported. If no LTS version matching the version constraint is available, only **release** versions are supported.
|
||||
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
|
||||
- [Debian / Ubuntu and derivatives](#debian-ubuntu-and-derivatives)
|
||||
- [Arch Linux](#arch-linux)
|
||||
- [CentOS 7](#centos-7)
|
||||
- [Centos 8](#centos-8)
|
||||
- [Rocky Linux 8.4](#rocky-linux-84)
|
||||
- [Fedora](#fedora)
|
||||
- [Red Hat Enterprise Linux 8](#red-hat-enterprise-linux-8)
|
||||
- [FreeBSD](#freebsd)
|
||||
- [macOS](#macos)
|
||||
- [Gentoo](#gentoo)
|
||||
- [OpenBSD](#openbsd)
|
||||
- [Other distributions](#other-distributions)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
[[toc]]
|
||||
|
||||
## Debian / Ubuntu and derivatives
|
||||
|
||||
1. On a fresh Debian/Ubuntu, as root user, install basic utility programs needed for the installation
|
||||
|
||||
```sh
|
||||
sudo apt-get install curl sudo unzip vim
|
||||
```
|
||||
```sh
|
||||
sudo apt-get install curl sudo unzip vim
|
||||
```
|
||||
|
||||
2. It would be wise to disable root access and to continue this tutorial with a user with sudoers group access. You can see a guide for how to do this in Debian/Ubuntu [here](https://www.digitalocean.com/community/tutorials/how-to-add-and-delete-users-on-ubuntu-20-04).
|
||||
1. It would be wise to disable root access and to continue this tutorial with a user with sudoers group access. You can see a guide for how to do this in Debian/Ubuntu [here](https://www.digitalocean.com/community/tutorials/how-to-add-and-delete-users-on-ubuntu-20-04).
|
||||
|
||||
3. Install NodeJS 20.x:
|
||||
1. Install NodeJS 20.x:
|
||||
[https://nodejs.org/en/download/package-manager/all#debian-and-ubuntu-based-linux-distributions](https://nodejs.org/en/download/package-manager/all#debian-and-ubuntu-based-linux-distributions)
|
||||
4. Install yarn, and be sure to have [a recent version](https://github.com/yarnpkg/yarn/releases/latest):
|
||||
|
||||
1. Install [PNPM](https://pnpm.io/fr/installation):
|
||||
|
||||
```sh
|
||||
sudo npm install -g pnpm
|
||||
````
|
||||
|
||||
1. Install yarn, and be sure to have [a recent version](https://github.com/yarnpkg/yarn/releases/latest):
|
||||
[https://yarnpkg.com/en/docs/install#linux-tab](https://yarnpkg.com/en/docs/install#linux-tab)
|
||||
|
||||
5. Install Python:
|
||||
1. Install Python:
|
||||
|
||||
On Ubuntu >= focal (20.04 LTS) or Debian >= Bullseye:
|
||||
```sh
|
||||
sudo apt update
|
||||
sudo apt install python3-dev python3-pip python-is-python3
|
||||
python --version # Should be >= 3.8
|
||||
```
|
||||
|
||||
```sh
|
||||
sudo apt update
|
||||
sudo apt install python3-dev python3-pip python-is-python3
|
||||
python --version # Should be >= 3.8
|
||||
```
|
||||
1. Install common dependencies:
|
||||
|
||||
6. Install common dependencies:
|
||||
|
||||
```sh
|
||||
sudo apt update
|
||||
sudo apt install certbot nginx ffmpeg postgresql postgresql-contrib openssl g++ make redis-server git cron wget
|
||||
ffmpeg -version # Should be >= 4.1
|
||||
g++ -v # Should be >= 5.x
|
||||
redis-server --version # Should be >= 6.x
|
||||
```
|
||||
```sh
|
||||
sudo apt update
|
||||
sudo apt install certbot nginx ffmpeg postgresql postgresql-contrib openssl g++ make redis-server git cron wget
|
||||
ffmpeg -version # Should be >= 4.1
|
||||
g++ -v # Should be >= 5.x
|
||||
redis-server --version # Should be >= 6.x
|
||||
```
|
||||
|
||||
Now that dependencies are installed, before running PeerTube you should start PostgreSQL and Redis:
|
||||
|
||||
|
@ -76,10 +66,10 @@ sudo systemctl start redis postgresql
|
|||
|
||||
## Arch Linux
|
||||
|
||||
1. Run:
|
||||
Run:
|
||||
|
||||
```sh
|
||||
sudo pacman -S nodejs-lts-fermium yarn ffmpeg postgresql openssl redis git wget unzip python python-pip base-devel npm nginx
|
||||
sudo pacman -S nodejs-lts-iron yarn ffmpeg postgresql openssl redis git wget unzip python python-pip base-devel npm nginx pnpm
|
||||
```
|
||||
|
||||
Now that dependencies are installed, before running PeerTube you should start PostgreSQL and Redis:
|
||||
|
@ -93,40 +83,46 @@ sudo systemctl start redis postgresql
|
|||
1. Install NodeJS 20.x:
|
||||
[https://nodejs.org/en/download/package-manager/all#centos-fedora-and-red-hat-enterprise-linux](https://nodejs.org/en/download/package-manager/all#centos-fedora-and-red-hat-enterprise-linux)
|
||||
|
||||
2. Install yarn:
|
||||
1. Install yarn:
|
||||
[https://yarnpkg.com/en/docs/install](https://yarnpkg.com/en/docs/install)
|
||||
|
||||
3. Install or compile ffmpeg:
|
||||
1. Install [PNPM](https://pnpm.io/fr/installation):
|
||||
|
||||
* Install - [https://linoxide.com/linux-how-to/install-ffmpeg-centos-7/](https://linoxide.com/linux-how-to/install-ffmpeg-centos-7/)
|
||||
* Compile - [https://gist.github.com/mustafaturan/7053900#file-latest-ffmpeg-centos6-sh](https://gist.github.com/mustafaturan/7053900#file-latest-ffmpeg-centos6-sh)
|
||||
```sh
|
||||
sudo npm install -g pnpm
|
||||
````
|
||||
|
||||
4. Install Packages:
|
||||
1. Install or compile ffmpeg:
|
||||
|
||||
```sh
|
||||
sudo yum update
|
||||
sudo yum install epel-release centos-release-scl
|
||||
sudo yum update
|
||||
sudo yum install nginx postgresql postgresql-server postgresql-contrib openssl gcc-c++ make wget redis git devtoolset-7
|
||||
```
|
||||
* Install - [https://linoxide.com/linux-how-to/install-ffmpeg-centos-7/](https://linoxide.com/linux-how-to/install-ffmpeg-centos-7/)
|
||||
* Compile - [https://gist.github.com/mustafaturan/7053900#file-latest-ffmpeg-centos6-sh](https://gist.github.com/mustafaturan/7053900#file-latest-ffmpeg-centos6-sh)
|
||||
|
||||
5. You need to use a more up to date version of G++ in order to run the `npm run install-node-dependencies` command, hence the installation of devtoolset-7.
|
||||
1. Install Packages:
|
||||
|
||||
```sh
|
||||
sudo scl enable devtoolset-7 bash
|
||||
```
|
||||
```sh
|
||||
sudo yum update
|
||||
sudo yum install epel-release centos-release-scl
|
||||
sudo yum update
|
||||
sudo yum install nginx postgresql postgresql-server postgresql-contrib openssl gcc-c++ make wget redis git devtoolset-7
|
||||
```
|
||||
|
||||
Later when you invoke any node command, please prefix them with `CC=/opt/rh/devtoolset-7/root/usr/bin/gcc CXX=/opt/rh/devtoolset-7/root/usr/bin/g++`, such as with:
|
||||
1. You need to use a more up to date version of G++ in order to run the `npm run install-node-dependencies` command, hence the installation of devtoolset-7.
|
||||
|
||||
```sh
|
||||
sudo -H -u peertube CC=/opt/rh/devtoolset-7/root/usr/bin/gcc CXX=/opt/rh/devtoolset-7/root/usr/bin/g++ npm run install-node-dependencies -- --production
|
||||
```
|
||||
```sh
|
||||
sudo scl enable devtoolset-7 bash
|
||||
```
|
||||
|
||||
6. Initialize the PostgreSQL database:
|
||||
Later when you invoke any node command, please prefix them with `CC=/opt/rh/devtoolset-7/root/usr/bin/gcc CXX=/opt/rh/devtoolset-7/root/usr/bin/g++`, such as with:
|
||||
|
||||
```sh
|
||||
sudo PGSETUP_INITDB_OPTIONS='--auth-host=md5' postgresql-setup --initdb --unit postgresql
|
||||
```
|
||||
```sh
|
||||
sudo -H -u peertube CC=/opt/rh/devtoolset-7/root/usr/bin/gcc CXX=/opt/rh/devtoolset-7/root/usr/bin/g++ npm run install-node-dependencies -- --production
|
||||
```
|
||||
|
||||
1. Initialize the PostgreSQL database:
|
||||
|
||||
```sh
|
||||
sudo PGSETUP_INITDB_OPTIONS='--auth-host=md5' postgresql-setup --initdb --unit postgresql
|
||||
```
|
||||
|
||||
Now that dependencies are installed, before running PeerTube you should enable and start PostgreSQL and Redis:
|
||||
|
||||
|
@ -140,38 +136,44 @@ sudo systemctl enable --now postgresql
|
|||
1. Install NodeJS 20.x:
|
||||
[https://nodejs.org/en/download/package-manager/all#centos-fedora-and-red-hat-enterprise-linux](https://nodejs.org/en/download/package-manager/all#centos-fedora-and-red-hat-enterprise-linux)
|
||||
|
||||
2. Install yarn:
|
||||
1. Install yarn:
|
||||
[https://yarnpkg.com/en/docs/install](https://yarnpkg.com/en/docs/install)
|
||||
|
||||
3. Install or compile ffmpeg:
|
||||
1. Install [PNPM](https://pnpm.io/fr/installation):
|
||||
|
||||
```sh
|
||||
sudo dnf install epel-release dnf-utils
|
||||
sudo yum-config-manager --set-enabled powertools
|
||||
sudo yum-config-manager --add-repo=https://negativo17.org/repos/epel-multimedia.repo
|
||||
sudo dnf install ffmpeg
|
||||
```
|
||||
```sh
|
||||
sudo npm install -g pnpm
|
||||
````
|
||||
|
||||
4. Install packages:
|
||||
1. Install or compile ffmpeg:
|
||||
|
||||
```sh
|
||||
sudo dnf update
|
||||
sudo dnf install epel-release
|
||||
sudo dnf update
|
||||
sudo dnf install nginx postgresql postgresql-server postgresql-contrib openssl gcc-c++ make wget redis git unzip
|
||||
```
|
||||
```sh
|
||||
sudo dnf install epel-release dnf-utils
|
||||
sudo yum-config-manager --set-enabled powertools
|
||||
sudo yum-config-manager --add-repo=https://negativo17.org/repos/epel-multimedia.repo
|
||||
sudo dnf install ffmpeg
|
||||
```
|
||||
|
||||
5. You'll need a symlink for python3 to python for youtube-dl to work
|
||||
1. Install packages:
|
||||
|
||||
```sh
|
||||
sudo ln -s /usr/bin/python3 /usr/bin/python
|
||||
```
|
||||
```sh
|
||||
sudo dnf update
|
||||
sudo dnf install epel-release
|
||||
sudo dnf update
|
||||
sudo dnf install nginx postgresql postgresql-server postgresql-contrib openssl gcc-c++ make wget redis git unzip
|
||||
```
|
||||
|
||||
6. Initialize the PostgreSQL database:
|
||||
1. You'll need a symlink for python3 to python for youtube-dl to work
|
||||
|
||||
```sh
|
||||
sudo PGSETUP_INITDB_OPTIONS='--auth-host=md5' postgresql-setup --initdb --unit postgresql
|
||||
```
|
||||
```sh
|
||||
sudo ln -s /usr/bin/python3 /usr/bin/python
|
||||
```
|
||||
|
||||
1. Initialize the PostgreSQL database:
|
||||
|
||||
```sh
|
||||
sudo PGSETUP_INITDB_OPTIONS='--auth-host=md5' postgresql-setup --initdb --unit postgresql
|
||||
```
|
||||
|
||||
Now that dependencies are installed, before running PeerTube you should enable and start PostgreSQL and Redis:
|
||||
|
||||
|
@ -183,235 +185,252 @@ sudo systemctl enable --now postgresql
|
|||
## Rocky Linux 8.4
|
||||
|
||||
1. Pull the latest updates:
|
||||
```sh
|
||||
sudo dnf update -y
|
||||
```
|
||||
```sh
|
||||
sudo dnf update -y
|
||||
```
|
||||
|
||||
2. Install NodeJS 20.x:
|
||||
```sh
|
||||
sudo dnf module install -y nodejs:20
|
||||
```
|
||||
1. Install NodeJS 20.x:
|
||||
```sh
|
||||
sudo dnf module install -y nodejs:20
|
||||
```
|
||||
|
||||
3. Install yarn:
|
||||
```sh
|
||||
sudo npm install --global yarn
|
||||
```
|
||||
1. Install yarn:
|
||||
```sh
|
||||
sudo npm install --global yarn
|
||||
```
|
||||
|
||||
4. Install or compile ffmpeg (if you want to compile... enjoy):
|
||||
```sh
|
||||
sudo dnf install -y epel-release
|
||||
sudo dnf --enablerepo=powertools install -y SDL2 SDL2-devel
|
||||
sudo dnf install -y --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-8.noarch.rpm
|
||||
sudo dnf install -y ffmpeg
|
||||
sudo dnf update -y
|
||||
```
|
||||
1. Install PNPM:
|
||||
```sh
|
||||
sudo npm install --global pnpm
|
||||
```
|
||||
|
||||
5. Install PostgreSQL and Python3 and other stuff:
|
||||
```sh
|
||||
sudo dnf install -y nginx postgresql postgresql-server postgresql-contrib openssl gcc-c++ make wget redis git python3 python3-pip
|
||||
sudo ln -s /usr/bin/python3 /usr/bin/python
|
||||
sudo PGSETUP_INITDB_OPTIONS='--auth-host=md5' postgresql-setup --initdb --unit postgresql
|
||||
sudo systemctl enable --now redis
|
||||
sudo systemctl enable --now postgresql
|
||||
```
|
||||
1. Install or compile ffmpeg (if you want to compile... enjoy):
|
||||
```sh
|
||||
sudo dnf install -y epel-release
|
||||
sudo dnf --enablerepo=powertools install -y SDL2 SDL2-devel
|
||||
sudo dnf install -y --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-8.noarch.rpm
|
||||
sudo dnf install -y ffmpeg
|
||||
sudo dnf update -y
|
||||
```
|
||||
|
||||
6. Unknown missing steps:
|
||||
- Steps missing here... these were adapted from the CentOS 8 steps which abruptly ended.
|
||||
- /var/www/peertube does not exist yet (expected? done in future steps? documentation?).
|
||||
- Nothing about Certbot, NGINX, Firewall settings, and etc.
|
||||
- Hopefully someone can suggest what is missing here with some hints so I can add it?
|
||||
1. Install PostgreSQL and Python3 and other stuff:
|
||||
```sh
|
||||
sudo dnf install -y nginx postgresql postgresql-server postgresql-contrib openssl gcc-c++ make wget redis git python3 python3-pip
|
||||
sudo ln -s /usr/bin/python3 /usr/bin/python
|
||||
sudo PGSETUP_INITDB_OPTIONS='--auth-host=md5' postgresql-setup --initdb --unit postgresql
|
||||
sudo systemctl enable --now redis
|
||||
sudo systemctl enable --now postgresql
|
||||
```
|
||||
|
||||
1. Unknown missing steps:
|
||||
- Steps missing here... these were adapted from the CentOS 8 steps which abruptly ended.
|
||||
- /var/www/peertube does not exist yet (expected? done in future steps? documentation?).
|
||||
- Nothing about Certbot, NGINX, Firewall settings, and etc.
|
||||
- Hopefully someone can suggest what is missing here with some hints so I can add it?
|
||||
|
||||
## Fedora
|
||||
|
||||
1. Upgrade your packages:
|
||||
|
||||
```sh
|
||||
dnf upgrade
|
||||
```
|
||||
```sh
|
||||
dnf upgrade
|
||||
```
|
||||
|
||||
2. (Optional) Install certbot (choose instructions for your distribution):
|
||||
1. (Optional) Install certbot (choose instructions for your distribution):
|
||||
[https://certbot.eff.org/all-instructions](https://certbot.eff.org/all-instructions)
|
||||
|
||||
3. Install NodeJS 20.x:
|
||||
1. Install NodeJS 20.x:
|
||||
[https://nodejs.org/en/download/package-manager/all#centos-fedora-and-red-hat-enterprise-linux](https://nodejs.org/en/download/package-manager/all#centos-fedora-and-red-hat-enterprise-linux)
|
||||
|
||||
4. Install yarn:
|
||||
1. Install yarn:
|
||||
[https://yarnpkg.com/en/docs/install](https://yarnpkg.com/en/docs/install)
|
||||
|
||||
5. Enable [RPM Fusion](https://rpmfusion.org) for Fedora (available for x86, x86_64, armhfp)
|
||||
1. Install PNPM:
|
||||
```sh
|
||||
sudo npm install --global pnpm
|
||||
```
|
||||
|
||||
```sh
|
||||
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
|
||||
```
|
||||
This is necessary because `ffmpeg` is not in the Fedora repos.
|
||||
1. Enable [RPM Fusion](https://rpmfusion.org) for Fedora (available for x86, x86_64, armhfp)
|
||||
|
||||
6. Run:
|
||||
```sh
|
||||
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
|
||||
```
|
||||
|
||||
```sh
|
||||
sudo dnf install nginx ffmpeg postgresql-server postgresql-contrib openssl gcc-c++ make redis git vim
|
||||
ffmpeg -version # Should be >= 4.1
|
||||
g++ -v # Should be >= 5.x
|
||||
redis-server --version # Should be >= 6.x
|
||||
```
|
||||
This is necessary because `ffmpeg` is not in the Fedora repos.
|
||||
|
||||
7. Configure nginx
|
||||
1. Run:
|
||||
|
||||
```sh
|
||||
sudo mkdir /etc/nginx/sites-available
|
||||
sudo mkdir /etc/nginx/sites-enabled
|
||||
sudo ln -s /etc/nginx/sites-enabled/peertube /etc/nginx/conf.d/peertube.conf
|
||||
```
|
||||
```sh
|
||||
sudo dnf install nginx ffmpeg postgresql-server postgresql-contrib openssl gcc-c++ make redis git vim
|
||||
ffmpeg -version # Should be >= 4.1
|
||||
g++ -v # Should be >= 5.x
|
||||
redis-server --version # Should be >= 6.x
|
||||
```
|
||||
|
||||
8. Post-installation
|
||||
1. Configure nginx
|
||||
|
||||
_from [PostgreSQL documentation](https://www.postgresql.org/download/linux/redhat/):_
|
||||
> Due to policies for Red Hat family distributions, the PostgreSQL installation will not be enabled for automatic start or have the database initialized automatically.
|
||||
```sh
|
||||
sudo mkdir /etc/nginx/sites-available
|
||||
sudo mkdir /etc/nginx/sites-enabled
|
||||
sudo ln -s /etc/nginx/sites-enabled/peertube /etc/nginx/conf.d/peertube.conf
|
||||
```
|
||||
|
||||
```sh
|
||||
# PostgreSQL
|
||||
sudo PGSETUP_INITDB_OPTIONS='--auth-host=md5' postgresql-setup --initdb --unit postgresql
|
||||
sudo systemctl enable postgresql.service
|
||||
sudo systemctl start postgresql.service
|
||||
# Nginx
|
||||
sudo systemctl enable nginx.service
|
||||
sudo systemctl start nginx.service
|
||||
# Redis
|
||||
sudo systemctl enable redis.service
|
||||
sudo systemctl start redis.service
|
||||
```
|
||||
1. Post-installation
|
||||
|
||||
9. Firewall
|
||||
_from [PostgreSQL documentation](https://www.postgresql.org/download/linux/redhat/):_
|
||||
> Due to policies for Red Hat family distributions, the PostgreSQL installation will not be enabled for automatic start or have the database initialized automatically.
|
||||
|
||||
By default, you cannot access your server via public IP. To do so, you must configure firewall:
|
||||
```sh
|
||||
# PostgreSQL
|
||||
sudo PGSETUP_INITDB_OPTIONS='--auth-host=md5' postgresql-setup --initdb --unit postgresql
|
||||
sudo systemctl enable postgresql.service
|
||||
sudo systemctl start postgresql.service
|
||||
# Nginx
|
||||
sudo systemctl enable nginx.service
|
||||
sudo systemctl start nginx.service
|
||||
# Redis
|
||||
sudo systemctl enable redis.service
|
||||
sudo systemctl start redis.service
|
||||
```
|
||||
|
||||
- Ports used by peertube dev setup:
|
||||
```sh
|
||||
sudo firewall-cmd --permanent --zone=public --add-port=3000/tcp
|
||||
sudo firewall-cmd --permanent --zone=public --add-port=9000/tcp
|
||||
```
|
||||
- Optional
|
||||
1. Firewall
|
||||
|
||||
```sh
|
||||
sudo firewall-cmd --permanent --zone=public --add-service=http
|
||||
sudo firewall-cmd --permanent --zone=public --add-service=https
|
||||
```
|
||||
By default, you cannot access your server via public IP. To do so, you must configure the firewall.
|
||||
|
||||
- Reload firewall
|
||||
Ports used by peertube dev setup:
|
||||
```sh
|
||||
sudo firewall-cmd --permanent --zone=public --add-port=3000/tcp
|
||||
sudo firewall-cmd --permanent --zone=public --add-port=9000/tcp
|
||||
```
|
||||
|
||||
```sh
|
||||
sudo firewall-cmd --reload
|
||||
```
|
||||
* Optional
|
||||
|
||||
11. Configure max ports
|
||||
```sh
|
||||
sudo firewall-cmd --permanent --zone=public --add-service=http
|
||||
sudo firewall-cmd --permanent --zone=public --add-service=https
|
||||
```
|
||||
|
||||
This is necessary if you are running dev setup, otherwise you will have errors with `nodemon`
|
||||
* Reload firewall
|
||||
|
||||
```sh
|
||||
echo fs.inotify.max_user_watches=582222 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
|
||||
```
|
||||
```sh
|
||||
sudo firewall-cmd --reload
|
||||
```
|
||||
|
||||
[More info](https://stackoverflow.com/questions/34662574/node-js-getting-error-nodemon-internal-watch-failed-watch-enospc#34664097)
|
||||
1. Configure max ports
|
||||
|
||||
This is necessary if you are running dev setup, otherwise you will have errors with `nodemon`
|
||||
|
||||
```sh
|
||||
echo fs.inotify.max_user_watches=582222 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
|
||||
```
|
||||
|
||||
[More info](https://stackoverflow.com/questions/34662574/node-js-getting-error-nodemon-internal-watch-failed-watch-enospc#34664097)
|
||||
|
||||
## Red Hat Enterprise Linux 8
|
||||
|
||||
1. Register system as root user to Red Hat Subscription Management (create a free Red Hat account if you don't have one yet).
|
||||
|
||||
```sh
|
||||
# subscription-manager register --username <username> --password <password> --auto-attach
|
||||
# dnf upgrade
|
||||
# reboot
|
||||
```
|
||||
```sh
|
||||
# subscription-manager register --username <username> --password <password> --auto-attach
|
||||
# dnf upgrade
|
||||
# reboot
|
||||
```
|
||||
|
||||
2. Install Node.JS
|
||||
1. Install NodeJS
|
||||
|
||||
```sh
|
||||
sudo dnf module install nodejs:20
|
||||
```
|
||||
```sh
|
||||
sudo dnf module install nodejs:20
|
||||
```
|
||||
|
||||
3. Install Yarn
|
||||
1. Install Yarn
|
||||
|
||||
```sh
|
||||
curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
|
||||
sudo dnf install yarn
|
||||
```
|
||||
```sh
|
||||
curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
|
||||
sudo dnf install yarn
|
||||
```
|
||||
|
||||
4. Install FFmpeg
|
||||
1. Install PNPM:
|
||||
```sh
|
||||
sudo npm install --global pnpm
|
||||
```
|
||||
|
||||
```sh
|
||||
sudo subscription-manager repos --enable "codeready-builder-for-rhel-8-$(arch)-rpms"
|
||||
sudo dnf install --nogpgcheck https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
|
||||
sudo dnf install --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm
|
||||
sudo dnf upgrade
|
||||
sudo dnf install ffmpeg
|
||||
```
|
||||
1. Install FFmpeg
|
||||
|
||||
5. Run:
|
||||
```sh
|
||||
sudo subscription-manager repos --enable "codeready-builder-for-rhel-8-$(arch)-rpms"
|
||||
sudo dnf install --nogpgcheck https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
|
||||
sudo dnf install --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm
|
||||
sudo dnf upgrade
|
||||
sudo dnf install ffmpeg
|
||||
```
|
||||
|
||||
```sh
|
||||
sudo dnf install nginx postgresql postgresql-server postgresql-contrib openssl gcc-c++ make wget redis git
|
||||
```
|
||||
1. Run:
|
||||
|
||||
6. You'll need a symlink for python3 to python for youtube-dl to work
|
||||
```sh
|
||||
sudo dnf install nginx postgresql postgresql-server postgresql-contrib openssl gcc-c++ make wget redis git
|
||||
```
|
||||
|
||||
```sh
|
||||
sudo alternatives --set python3 /usr/bin/python
|
||||
```
|
||||
1. You'll need a symlink for python3 to python for youtube-dl to work
|
||||
|
||||
7. Initialize the PostgreSQL database:
|
||||
```sh
|
||||
sudo alternatives --set python3 /usr/bin/python
|
||||
```
|
||||
|
||||
```sh
|
||||
sudo PGSETUP_INITDB_OPTIONS='--auth-host=md5' postgresql-setup --initdb --unit postgresql
|
||||
```
|
||||
1. Initialize the PostgreSQL database:
|
||||
|
||||
Now that dependencies are installed, before running PeerTube you should enable and start PostgreSQL and Redis:
|
||||
```sh
|
||||
sudo PGSETUP_INITDB_OPTIONS='--auth-host=md5' postgresql-setup --initdb --unit postgresql
|
||||
```
|
||||
|
||||
```sh
|
||||
sudo systemctl enable --now redis
|
||||
sudo systemctl enable --now postgresql
|
||||
```
|
||||
Now that dependencies are installed, before running PeerTube you should enable and start PostgreSQL and Redis:
|
||||
|
||||
If you are running the production guide, you also need to slightly pre-configure nginx, because nginx is packaged differently in the Red Hat family distributions:
|
||||
```sh
|
||||
sudo systemctl enable --now redis
|
||||
sudo systemctl enable --now postgresql
|
||||
```
|
||||
|
||||
8. Configure nginx
|
||||
If you are running the production guide, you also need to slightly pre-configure nginx, because nginx is packaged differently in the Red Hat family distributions:
|
||||
|
||||
```sh
|
||||
sudo mkdir /etc/nginx/sites-available
|
||||
sudo mkdir /etc/nginx/sites-enabled
|
||||
sudo ln -s /etc/nginx/sites-enabled/peertube /etc/nginx/conf.d/peertube.conf
|
||||
sudo systemctl enable --now nginx
|
||||
```
|
||||
1. Configure nginx
|
||||
|
||||
9. Firewall
|
||||
```sh
|
||||
sudo mkdir /etc/nginx/sites-available
|
||||
sudo mkdir /etc/nginx/sites-enabled
|
||||
sudo ln -s /etc/nginx/sites-enabled/peertube /etc/nginx/conf.d/peertube.conf
|
||||
sudo systemctl enable --now nginx
|
||||
```
|
||||
|
||||
By default, you cannot access your server via public IP. To do so, you must configure firewall:
|
||||
1. Firewall
|
||||
|
||||
- Ports used by peertube dev setup:
|
||||
```sh
|
||||
sudo firewall-cmd --permanent --zone=public --add-port=3000/tcp
|
||||
sudo firewall-cmd --permanent --zone=public --add-port=9000/tcp
|
||||
```
|
||||
- Optional
|
||||
By default, you cannot access your server via public IP. To do so, you must configure firewall:
|
||||
|
||||
```sh
|
||||
sudo firewall-cmd --permanent --zone=public --add-service=http
|
||||
sudo firewall-cmd --permanent --zone=public --add-service=https
|
||||
```
|
||||
* Ports used by peertube dev setup:
|
||||
```sh
|
||||
sudo firewall-cmd --permanent --zone=public --add-port=3000/tcp
|
||||
sudo firewall-cmd --permanent --zone=public --add-port=9000/tcp
|
||||
```
|
||||
* Optional
|
||||
|
||||
- Reload firewall
|
||||
```sh
|
||||
sudo firewall-cmd --permanent --zone=public --add-service=http
|
||||
sudo firewall-cmd --permanent --zone=public --add-service=https
|
||||
```
|
||||
|
||||
```sh
|
||||
sudo firewall-cmd --reload
|
||||
```
|
||||
* Reload firewall
|
||||
|
||||
10. Configure max ports
|
||||
```sh
|
||||
sudo firewall-cmd --reload
|
||||
```
|
||||
|
||||
This is necessary if you are running dev setup, otherwise you will have errors with `nodemon`
|
||||
1. Configure max ports
|
||||
|
||||
```sh
|
||||
echo fs.inotify.max_user_watches=582222 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
|
||||
```
|
||||
This is necessary if you are running dev setup, otherwise you will have errors with `nodemon`
|
||||
|
||||
[More info](https://stackoverflow.com/questions/34662574/node-js-getting-error-nodemon-internal-watch-failed-watch-enospc#34664097)
|
||||
```sh
|
||||
echo fs.inotify.max_user_watches=582222 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
|
||||
```
|
||||
|
||||
[More info](https://stackoverflow.com/questions/34662574/node-js-getting-error-nodemon-internal-watch-failed-watch-enospc#34664097)
|
||||
|
||||
|
||||
## FreeBSD
|
||||
|
@ -420,160 +439,172 @@ On a fresh install of [FreeBSD](https://www.freebsd.org), new system or new jail
|
|||
|
||||
1. bootstrap pkg, initialize db and install peertube's dependencies, always as root (sudo not yet installed):
|
||||
|
||||
```sh
|
||||
pkg
|
||||
pkg update
|
||||
pkg install -y sudo bash wget git python nginx pkgconf postgresql13-server postgresql13-contrib redis openssl node npm yarn ffmpeg unzip
|
||||
```
|
||||
```sh
|
||||
pkg
|
||||
pkg update
|
||||
pkg install -y sudo bash wget git python nginx pkgconf postgresql13-server postgresql13-contrib redis openssl node npm yarn ffmpeg unzip
|
||||
```
|
||||
|
||||
2. Allow users in the wheel group (hope you don't forgot to add your user on wheel group!) to use sudo.
|
||||
1. Install PNPM:
|
||||
```sh
|
||||
sudo npm install --global pnpm
|
||||
```
|
||||
|
||||
```sh
|
||||
visudo
|
||||
```
|
||||
1. Allow users in the wheel group (hope you don't forgot to add your user on wheel group!) to use sudo.
|
||||
|
||||
Uncomment the line 90
|
||||
```sh
|
||||
visudo
|
||||
```
|
||||
|
||||
```
|
||||
%wheel ALL=(ALL) ALL
|
||||
```
|
||||
Uncomment the line 90
|
||||
|
||||
3. Enable nginx, redis, postgresql services and initialize database.
|
||||
```
|
||||
%wheel ALL=(ALL) ALL
|
||||
```
|
||||
|
||||
```sh
|
||||
sysrc postgresql_enable="YES"
|
||||
sysrc redis_enable="YES"
|
||||
sysrc nginx_enable="YES"
|
||||
```
|
||||
1. Enable nginx, redis, postgresql services and initialize database.
|
||||
|
||||
Initialize database and start services
|
||||
```sh
|
||||
sysrc postgresql_enable="YES"
|
||||
sysrc redis_enable="YES"
|
||||
sysrc nginx_enable="YES"
|
||||
```
|
||||
|
||||
```sh
|
||||
service postgresql initdb
|
||||
service postgresql start
|
||||
service redis start
|
||||
service nginx start
|
||||
```
|
||||
Initialize database and start services
|
||||
|
||||
```sh
|
||||
service postgresql initdb
|
||||
service postgresql start
|
||||
service redis start
|
||||
service nginx start
|
||||
```
|
||||
|
||||
## macOS
|
||||
|
||||
1. Add the packages:
|
||||
|
||||
```sh
|
||||
brew install bash ffmpeg nginx postgresql openssl gcc make redis git yarn
|
||||
```
|
||||
```sh
|
||||
brew install bash ffmpeg nginx postgresql openssl gcc make redis git yarn pnpm
|
||||
```
|
||||
|
||||
You may need to update your default version of bash.
|
||||
You may need to update your default version of bash.
|
||||
|
||||
**How to change your default shell**
|
||||
**How to change your default shell**
|
||||
|
||||
```sh
|
||||
which -a bash # Check where bash is installed
|
||||
bash --version # You need a version at least as recent as 4.0
|
||||
sudo vim /etc/shells # Add in this file : /usr/local/bin/bash
|
||||
chsh -s /usr/local/bin/bash # To set the brew-installed bash as default bash
|
||||
```
|
||||
```sh
|
||||
which -a bash # Check where bash is installed
|
||||
bash --version # You need a version at least as recent as 4.0
|
||||
sudo vim /etc/shells # Add in this file : /usr/local/bin/bash
|
||||
chsh -s /usr/local/bin/bash # To set the brew-installed bash as default bash
|
||||
```
|
||||
|
||||
In a new shell, type `bash --version` to assert your changes took effect and
|
||||
correctly modified your default bash version.
|
||||
In a new shell, type `bash --version` to assert your changes took effect and
|
||||
correctly modified your default bash version.
|
||||
|
||||
2. Run the services:
|
||||
1. Run the services:
|
||||
|
||||
```sh
|
||||
brew services run postgresql
|
||||
brew services run redis
|
||||
```
|
||||
```sh
|
||||
brew services run postgresql
|
||||
brew services run redis
|
||||
```
|
||||
|
||||
On macOS, the `postgresql` user can be `_postgres` instead of `postgres`.
|
||||
If `sudo -u postgres createuser -P peertube` gives you an `unknown user: postgres` error, you can try `sudo -u _postgres createuser -U peertube`.
|
||||
On macOS, the `postgresql` user can be `_postgres` instead of `postgres`.
|
||||
If `sudo -u postgres createuser -P peertube` gives you an `unknown user: postgres` error, you can try `sudo -u _postgres createuser -U peertube`.
|
||||
|
||||
## Gentoo
|
||||
|
||||
1. Add this to ``/etc/portage/sets/peertube``:
|
||||
|
||||
```
|
||||
net-libs/nodejs
|
||||
sys-apps/yarn
|
||||
media-video/ffmpeg[x264] # Optionally add vorbis,vpx
|
||||
dev-db/postgresql
|
||||
dev-db/redis
|
||||
dev-vcs/git
|
||||
app-arch/unzip
|
||||
dev-lang/python
|
||||
dev-lang/python-exec
|
||||
www-servers/nginx
|
||||
```
|
||||
net-libs/nodejs
|
||||
sys-apps/yarn
|
||||
sys-apps/pnpm
|
||||
media-video/ffmpeg[x264] # Optionally add vorbis,vpx
|
||||
dev-db/postgresql
|
||||
dev-db/redis
|
||||
dev-vcs/git
|
||||
app-arch/unzip
|
||||
dev-lang/python
|
||||
dev-lang/python-exec
|
||||
www-servers/nginx
|
||||
|
||||
# Optional, client for Let’s Encrypt:
|
||||
# app-crypt/certbot
|
||||
```
|
||||
# Optional, client for Let’s Encrypt:
|
||||
# app-crypt/certbot
|
||||
```
|
||||
|
||||
2. If you are on a "stable" Gentoo you need to accept the testing keyword ~amd64 yarn:
|
||||
1. If you are on a "stable" Gentoo you need to accept the testing keyword ~amd64 yarn:
|
||||
|
||||
```sh
|
||||
mkdir -p /etc/portage/package.keywords
|
||||
cat << EOF >> /etc/portage/package.keywords/peertube
|
||||
# required by yarn (argument) for PeerTube
|
||||
sys-apps/yarn ~amd64
|
||||
EOF
|
||||
```
|
||||
```sh
|
||||
mkdir -p /etc/portage/package.keywords
|
||||
cat << EOF >> /etc/portage/package.keywords/peertube
|
||||
# required by yarn (argument) for PeerTube
|
||||
sys-apps/yarn ~amd64
|
||||
sys-apps/pnpm ~amd64
|
||||
EOF
|
||||
```
|
||||
|
||||
3. Compile the peertube set:
|
||||
1. Compile the peertube set:
|
||||
|
||||
```sh
|
||||
emerge -a @peertube
|
||||
```
|
||||
```sh
|
||||
emerge -a @peertube
|
||||
```
|
||||
|
||||
4. Initialize the PostgreSQL database if you just merged it:
|
||||
1. Initialize the PostgreSQL database if you just merged it:
|
||||
|
||||
```sh
|
||||
emerge --config postgresql
|
||||
```
|
||||
```sh
|
||||
emerge --config postgresql
|
||||
```
|
||||
|
||||
5. (For OpenRC) Enable and then start the services (replace with the correct PostgreSQL slot):
|
||||
1. (For OpenRC) Enable and then start the services (replace with the correct PostgreSQL slot):
|
||||
|
||||
```sh
|
||||
rc-update add redis
|
||||
rc-update add postgresql-11
|
||||
rc-service redis start
|
||||
rc-service postgresql-11 start
|
||||
```
|
||||
```sh
|
||||
rc-update add redis
|
||||
rc-update add postgresql-11
|
||||
rc-service redis start
|
||||
rc-service postgresql-11 start
|
||||
```
|
||||
|
||||
6. Create Python version symlink for youtube-dl:
|
||||
1. Create Python version symlink for youtube-dl:
|
||||
|
||||
```sh
|
||||
emerge -1 python-exec
|
||||
```
|
||||
```sh
|
||||
emerge -1 python-exec
|
||||
```
|
||||
|
||||
## OpenBSD
|
||||
|
||||
1. Install Packages:
|
||||
|
||||
```sh
|
||||
pkg_add sudo bash wget git python nginx pkgconf postgresql-server postgresql-contrib redis openssl
|
||||
```
|
||||
```sh
|
||||
pkg_add sudo bash wget git python nginx pkgconf postgresql-server postgresql-contrib redis openssl
|
||||
```
|
||||
|
||||
2. Install yarn:
|
||||
1. Install yarn:
|
||||
|
||||
```sh
|
||||
npm install --global yarn
|
||||
```
|
||||
```sh
|
||||
npm install --global yarn
|
||||
```
|
||||
|
||||
3. Allow users in the wheel group to use sudo
|
||||
1. Install PNPM:
|
||||
```sh
|
||||
sudo npm install --global pnpm
|
||||
```
|
||||
|
||||
```sh
|
||||
visudo
|
||||
```
|
||||
Uncomment line #43:
|
||||
1. Allow users in the wheel group to use sudo
|
||||
|
||||
```
|
||||
%wheel ALL=(ALL) ALL
|
||||
```
|
||||
```sh
|
||||
visudo
|
||||
```
|
||||
Uncomment line #43:
|
||||
|
||||
4. Enable services:
|
||||
```
|
||||
%wheel ALL=(ALL) ALL
|
||||
```
|
||||
|
||||
```sh
|
||||
rcctl enable postgresql redis nginx
|
||||
```
|
||||
1. Enable services:
|
||||
|
||||
```sh
|
||||
rcctl enable postgresql redis nginx
|
||||
```
|
||||
|
||||
## Other distributions
|
||||
|
||||
|
|
|
@ -304,7 +304,7 @@ cd /var/www/peertube/peertube-latest/scripts && sudo -H -u peertube ./upgrade.sh
|
|||
sudo systemctl restart peertube # Or use your OS command to restart PeerTube if you don't use systemd
|
||||
```
|
||||
|
||||
You may want to run `sudo -u peertube yarn cache clean` after several upgrades to free up disk space.
|
||||
You may want to run `sudo -u peertube pnpm store prune` after several upgrades to free up disk space.
|
||||
|
||||
<details>
|
||||
<summary><strong>Prefer manual upgrade?</strong></summary>
|
||||
|
|
|
@ -29,14 +29,14 @@ USER peertube
|
|||
|
||||
# Install manually client dependencies to apply our network timeout option
|
||||
RUN if [ "${ALREADY_BUILT}" = 0 ]; then \
|
||||
npm run install-node-dependencies -- --network-timeout 1200000 \
|
||||
npm run install-node-dependencies \
|
||||
&& npm run build; \
|
||||
else \
|
||||
echo "Do not build application inside Docker because of ALREADY_BUILT build argument"; \
|
||||
fi; \
|
||||
rm -rf ./node_modules ./client/node_modules ./client/.angular \
|
||||
&& NOCLIENT=1 npm run install-node-dependencies -- --production --network-timeout 1200000 --network-concurrency 20 \
|
||||
&& yarn cache clean
|
||||
&& npm run install-node-dependencies -- --production \
|
||||
&& pnpm store prune
|
||||
|
||||
USER root
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue