forked from coop-cloud/peertube
Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
2e0cf00740
|
|||
| 751d86dcc7 | |||
| 73f080adbc | |||
| b99671c2bf | |||
| d1b297c5a6 | |||
|
319707b52c
|
|||
|
fdb40723bb
|
|||
|
0dcc827104
|
|||
|
e995af0f61
|
|||
|
2f5a8b746e
|
|||
|
3e8c4733c2
|
|||
| 883839996a | |||
| 07ef3b1238 | |||
| f4a5681e10 | |||
| 5a94f938a3 | |||
| 6c175536ed | |||
| e10edda36f | |||
| 8c91f527a6 | |||
| 6fe5185316 | |||
| 51e9dea17f | |||
| 6b9e8dd862 | |||
| a076c442b6 |
@ -42,3 +42,6 @@ SECRET_DB_PASSWORD_VERSION=v1
|
||||
|
||||
## Live stream settings
|
||||
#COMPOSE_FILE="compose.yml:compose.rtmp.yml"
|
||||
|
||||
## Live chat settings
|
||||
#PEERTUBE_LIVE_CHAT_ENABLED=1
|
||||
|
||||
32
README.md
32
README.md
@ -6,14 +6,14 @@ An ActivityPub-federated video streaming platform using P2P directly in your web
|
||||
|
||||
<!-- metadata -->
|
||||
|
||||
- **Category**: Applications
|
||||
- **Status**: ❷💛
|
||||
- **Image**: [`chocobozzz/peertube`](https://hub.docker.com/r/chocobozzz/peertube), ❷💛, official
|
||||
- **Healthcheck**: ❶💚
|
||||
- **Backups**: ❸🍎
|
||||
- **Email**: ❶💚
|
||||
- **Tests**: ❌
|
||||
- **SSO**: ❸🍎
|
||||
* **Category**: Apps
|
||||
* **Status**: 2, beta
|
||||
* **Image**: [`chocobozzz/peertube`](https://hub.docker.com/r/chocobozzz/peertube), 4, upstream
|
||||
* **Healthcheck**: 3
|
||||
* **Backups**: 1
|
||||
* **Email**: 3
|
||||
* **Tests**: No
|
||||
* **SSO**: 1
|
||||
<!-- endmetadata -->
|
||||
|
||||
## Basic usage
|
||||
@ -27,6 +27,16 @@ An ActivityPub-federated video streaming platform using P2P directly in your web
|
||||
5. `abra app YOURAPPDOMAIN deploy`
|
||||
6. Open the configured domain in your browser to finish set-up
|
||||
|
||||
## Host-mode networking
|
||||
|
||||
To avoid issues with performance, it is recommended to deploy your Traefik instance with:
|
||||
|
||||
```
|
||||
COMPOSE_FILE="compose.yml:compose.host.yml:compose.peertube.yml"
|
||||
```
|
||||
|
||||
This will avoid issues like [`#7`](https://git.coopcloud.tech/coop-cloud/peertube/issues/7).
|
||||
|
||||
## Email
|
||||
|
||||
1. Deploy [`coop-cloud/postfix-relay`] or use an external SMTP relay
|
||||
@ -37,6 +47,10 @@ An ActivityPub-federated video streaming platform using P2P directly in your web
|
||||
[`coop-cloud/traefik`]: https://git.autonomic.zone/coop-cloud/traefik
|
||||
[`coop-cloud/postfix-relay`]: https://git.autonomic.zone/coop-cloud/postfix-relay
|
||||
|
||||
## Plugins
|
||||
|
||||
- [`peertube-plugin-auth-openid-connect`](https://www.npmjs.com/package/peertube-plugin-auth-openid-connect) is the trusted OAuth2 support plugin (Keycloak integrations works!)
|
||||
|
||||
## Acknowledgements
|
||||
|
||||
Thanks to [@mirsal](https://git.autonomic.zone/mirsal) for the packaging work :heart:
|
||||
Thanks to [@mirsal](https://git.coopcloud.tech/mirsal) for the packaging work :heart:
|
||||
|
||||
4
abra.sh
4
abra.sh
@ -1,7 +1,7 @@
|
||||
# shellcheck disable=SC2034,SC2145
|
||||
|
||||
export NGINX_CONFIG_VERSION=v2
|
||||
export APP_ENTRYPOINT_VERSION=v2
|
||||
export NGINX_CONFIG_VERSION=v4
|
||||
export APP_ENTRYPOINT_VERSION=v5
|
||||
|
||||
sub_npm() {
|
||||
abra__service_="app"
|
||||
|
||||
27
compose.yml
27
compose.yml
@ -1,4 +1,6 @@
|
||||
---
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
web:
|
||||
image: nginx:1.20.0
|
||||
@ -31,9 +33,9 @@ services:
|
||||
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)"
|
||||
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
|
||||
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
||||
- coop-cloud.${STACK_NAME}.web.version=1.20.0-ea4560b8
|
||||
|
||||
app:
|
||||
image: chocobozzz/peertube:v3.2.1-buster
|
||||
image: chocobozzz/peertube:v4.2.2-bullseye
|
||||
environment:
|
||||
- PEERTUBE_ADMIN_EMAIL
|
||||
- PEERTUBE_CONTACT_FORM_ENABLED
|
||||
@ -41,8 +43,10 @@ services:
|
||||
- PEERTUBE_DB_PASSWORD_FILE=/run/secrets/db_password
|
||||
- PEERTUBE_DB_PORT=5432
|
||||
- PEERTUBE_DB_USERNAME=peertube
|
||||
- PEERTUBE_LIVE_CHAT_ENABLED
|
||||
- PEERTUBE_REDIS_HOSTNAME=cache
|
||||
- PEERTUBE_SIGNUP_ENABLED
|
||||
- PEERTUBE_SMTP_ENABLED
|
||||
- PEERTUBE_TRANSCODING_ENABLED
|
||||
- PEERTUBE_TRUST_PROXY=["127.0.0.1", "loopback", "172.16.0.0/12", "10.0.0.0/8"]
|
||||
- PEERTUBE_WEBSERVER_HOSTNAME=${DOMAIN}
|
||||
@ -69,7 +73,9 @@ services:
|
||||
networks:
|
||||
- internal
|
||||
deploy:
|
||||
labels: ["coop-cloud.${STACK_NAME}.app.version=v3.2.1-buster-e4f797ee"]
|
||||
labels:
|
||||
- "coop-cloud.${STACK_NAME}.version=2.2.0+v4.2.2-bullseye"
|
||||
|
||||
db:
|
||||
image: postgres:10-alpine
|
||||
environment:
|
||||
@ -82,23 +88,19 @@ services:
|
||||
- postgres-data:/var/lib/postgresql/data
|
||||
networks:
|
||||
- internal
|
||||
deploy:
|
||||
update_config:
|
||||
failure_action: rollback
|
||||
order: start-first
|
||||
labels: ['coop-cloud.${STACK_NAME}.db.version=10-alpine-131220fe']
|
||||
|
||||
cache:
|
||||
image: redis:4-alpine
|
||||
volumes:
|
||||
- redis-data:/data
|
||||
networks:
|
||||
- internal
|
||||
deploy:
|
||||
labels: ['coop-cloud.${STACK_NAME}.cache.version=4-alpine-aaf7c123']
|
||||
|
||||
networks:
|
||||
internal:
|
||||
proxy:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
app-data:
|
||||
app-config:
|
||||
@ -107,6 +109,7 @@ volumes:
|
||||
nginx-cache:
|
||||
postgres-data:
|
||||
redis-data:
|
||||
|
||||
configs:
|
||||
nginx_config:
|
||||
name: ${STACK_NAME}_nginx_config_${NGINX_CONFIG_VERSION}
|
||||
@ -114,7 +117,9 @@ configs:
|
||||
template_driver: golang
|
||||
app_entrypoint:
|
||||
name: ${STACK_NAME}_app_entrypoint_${APP_ENTRYPOINT_VERSION}
|
||||
file: entrypoint.sh
|
||||
file: entrypoint.sh.tmpl
|
||||
template_driver: golang
|
||||
|
||||
secrets:
|
||||
db_password:
|
||||
external: true
|
||||
|
||||
@ -26,9 +26,14 @@ file_env() {
|
||||
|
||||
file_env "PEERTUBE_DB_PASSWORD"
|
||||
|
||||
if [ -z "$PEERTUBE_SMTP_ENABLED" ]; then
|
||||
file_env "PEERTUBE_SMTP_PASSWORD"
|
||||
fi
|
||||
{{ if eq (env "PEERTUBE_SMTP_ENABLED") "1" }}
|
||||
file_env "PEERTUBE_SMTP_PASSWORD"
|
||||
{{ end }}
|
||||
|
||||
{{ if eq (env "PEERTUBE_LIVE_CHAT_ENABLED") "1" }}
|
||||
apt -y update && apt install -y prosody && apt -y clean
|
||||
mkdir -p /run/prosody && chown prosody:prosody /run/prosody
|
||||
{{ end }}
|
||||
|
||||
# Copy the client files over to a named volume
|
||||
# so that they may be served by nginx directly
|
||||
@ -46,7 +46,7 @@ http {
|
||||
try_files /dev/null @api;
|
||||
}
|
||||
|
||||
location = /api/v1/videos/upload {
|
||||
location ~ ^/api/v1/videos/(upload|([^/]+/editor/edit))$ {
|
||||
limit_except POST HEAD { deny all; }
|
||||
|
||||
# This is the maximum upload size, which roughly matches the maximum size of a video file.
|
||||
@ -133,8 +133,8 @@ http {
|
||||
|
||||
# Bypass PeerTube for performance reasons. Optional.
|
||||
# Should be consistent with client-overrides assets list in /server/controllers/client.ts
|
||||
location ~ ^/client/(assets/images/(icons/icon-36x36\.png|icons/icon-48x48\.png|icons/icon-72x72\.png|icons/icon-96x96\.png|icons/icon-144x144\.png|icons/icon-192x192\.png|icons/icon-512x512\.png|logo\.svg|favicon\.png))$ {
|
||||
add_header Cache-Control "public, max-age=31536000, immutable"; # Cache 1 year
|
||||
location ~ ^/client/(assets/images/(icons/icon-36x36\.png|icons/icon-48x48\.png|icons/icon-72x72\.png|icons/icon-96x96\.png|icons/icon-144x144\.png|icons/icon-192x192\.png|icons/icon-512x512\.png|logo\.svg|favicon\.png|default-playlist\.jpg|default-avatar-account\.png|default-avatar-video-channel\.png))$ {
|
||||
add_header Cache-Control "public, max-age=31536000, immutable"; # Cache 1 year
|
||||
|
||||
root /var/www/peertube;
|
||||
|
||||
|
||||
27
release/2.0.0+v4.0.0-bullseye
Normal file
27
release/2.0.0+v4.0.0-bullseye
Normal file
@ -0,0 +1,27 @@
|
||||
This major release went fairly smoothly, there are 2 post-migration steps which
|
||||
are listed on the release notes:
|
||||
|
||||
https://github.com/Chocobozzz/PeerTube/releases/tag/v4.0.0
|
||||
|
||||
However, you need to do the second part first, adding additional config options
|
||||
and/or changing the old ones. When you try to run the data migration, it'll
|
||||
error out telling you which one you need to deal with, so that will help to guide.
|
||||
|
||||
Here's what I did:
|
||||
|
||||
abra app run tv.lumbung.space app bash
|
||||
apt update && apt install vim
|
||||
vi /config/production.yml # change options
|
||||
|
||||
Then, in another shell:
|
||||
|
||||
abra app run --user peertube tv.lumbung.space app bash
|
||||
|
||||
export NODE_CONFIG_DIR=/config
|
||||
export NODE_ENV=production
|
||||
export PEERTUBE_DB_PASSWORD=$(cat /run/secrets/db_password)
|
||||
node dist/scripts/migrations/peertube-4.0.js
|
||||
|
||||
After, this I ran a restart of the app service, and things went fine.
|
||||
|
||||
abra app restart tv.lumbung.space app
|
||||
Reference in New Issue
Block a user