Compare commits

...

33 Commits

Author SHA1 Message Date
knoflook 2e0cf00740 update nginx.conf.tmpl to match upstream 2022-07-29 12:25:00 +02:00
decentral1se 751d86dcc7 chore: publish 2.2.0+v4.2.2-bullseye release 2022-07-14 11:39:50 +02:00
decentral1se 73f080adbc chore: publish 2.1.1+v4.1.1-bullseye release 2022-03-08 14:16:10 +01:00
decentral1se b99671c2bf chore: publish 2.1.0+v4.1.0-bullseye release 2022-02-25 09:19:57 +01:00
decentral1se d1b297c5a6 chore: publish 2.0.0+v4.0.0-bullseye release 2022-01-18 10:47:52 +01:00
decentral1se 319707b52c new v4, prosody fix, unreleased so far 2022-01-17 14:22:33 +01:00
decentral1se fdb40723bb docs: fix link 2021-12-12 02:12:19 +01:00
decentral1se 0dcc827104 chore: bump version 2021-11-30 11:36:30 +01:00
decentral1se e995af0f61 refactor!: use templating for entrypoint 2021-11-30 11:32:30 +01:00
decentral1se 2f5a8b746e fix: thread smtp var 2021-11-30 11:27:16 +01:00
decentral1se 3e8c4733c2 feat: support live chat 2021-11-30 11:27:06 +01:00
d1admin 883839996a docs: add plugin 2021-11-25 17:12:41 +01:00
d1admin 07ef3b1238 chore: set new version labels 2021-11-25 16:05:47 +01:00
d1admin f4a5681e10 chore: new labels for new versioning scheme 2021-11-25 16:04:13 +01:00
d1admin 5a94f938a3 chore: yaml header 2021-11-25 16:04:00 +01:00
d1admin 6c175536ed chore: bump peertube version 2021-11-25 16:02:48 +01:00
3wordchant e10edda36f Goodbye, emojis! 😢
[ci skip]
2021-11-23 12:19:05 +02:00
3wordchant 8c91f527a6 chore: fix README bullet formatting
[ci skip]
2021-11-22 13:42:04 +02:00
d1admin 6fe5185316 Bump Nginx config 2021-09-03 09:05:32 +02:00
d1admin 51e9dea17f Upgrade labels 2021-09-03 09:04:28 +02:00
d1admin 6b9e8dd862 Upgrade peertube and add spaces 2021-09-03 09:02:58 +02:00
d1admin a076c442b6 Document host mode-ness
Closes coop-cloud/peertube#7.
2021-09-02 09:32:05 +02:00
decentral1se e2b4d39fe2 Merge pull request 'Copy the client assets over to a named volume at runtime' (#10) from copy-assets-folder into main
Reviewed-on: https://git.autonomic.zone/coop-cloud/peertube/pulls/10
2021-07-17 11:00:51 +02:00
mirsal 31520c2cb1 fix: Copy the client assets over to a named volume at runtime
This commit makes the entrypoint copy the client's dist files to
the mountpoint of the app-assets named volume. That way, changed
files are made available to the nginx container when the peertube
image gets updated

Closes: #8
2021-07-16 21:19:03 +00:00
decentral1se 99011f0df7 Merge pull request 'Add healthchecks and enable rolling updates for the nodejs service' (#9) from app-healthcheck into main
Reviewed-on: https://git.autonomic.zone/coop-cloud/peertube/pulls/9
2021-07-15 21:09:23 +02:00
mirsal 95aa921e4e compose: Enable rolling updates and rollbacks on the peertube app service 2021-07-15 16:32:36 +00:00
mirsal fe7aace9d7 compose: Add healthchecks to the peertube app service definition
This commit adds a native healthcheck to the peertube app service using
the nodejs command line interface.

kudos to @3wordchant for the idea :)
2021-07-15 16:09:15 +00:00
d1admin a23e16d632 Revert internal network change (see https://git.autonomic.zone/coop-cloud/organising/issues/62) 2021-07-15 16:08:12 +02:00
d1admin f986064092 Scope internal network internally 2021-07-10 15:34:39 +02:00
d1admin 04408f007a Fix handling of admin commands
See https://github.com/Coop-Cloud/peertube/issues/1.
See https://git.autonomic.zone/coop-cloud/abra/issues/200.
2021-07-06 11:19:10 +02:00
d1admin 406afdb8cf Update config version for Nginx 2021-06-24 17:43:25 +02:00
d1admin 046286d266 Add new Nginx config
Closes https://git.autonomic.zone/coop-cloud/peertube/issues/6.
2021-06-24 17:42:30 +02:00
d1admin d2f83bf386 Manually upgrade peertube to latest 2021-06-23 12:58:20 +02:00
7 changed files with 115 additions and 39 deletions
+3
View File
@@ -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
+23 -9
View File
@@ -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:
+17 -15
View File
@@ -1,24 +1,26 @@
export NGINX_CONFIG_VERSION=v1
export APP_ENTRYPOINT_VERSION=v1
# shellcheck disable=SC2034,SC2145
export NGINX_CONFIG_VERSION=v4
export APP_ENTRYPOINT_VERSION=v5
sub_npm() {
export NODE_CONFIG_DIR=/config
export NODE_ENV=production
export PEERTUBE_DB_PASSWORD=$(cat /run/secrets/db_password)
# shellcheck disable=SC2034
abra__service_="app"
sub_app_run npm run "$@"
ARGS="-e NODE_CONFIG_DIR=/config -e NODE_ENV=production"
sub_app_run bash -c "\
export PEERTUBE_DB_PASSWORD=\$(cat /run/secrets/db_password) && \
npm run \"$@\" \
"
}
sub_prune() {
info "Pruning storage"
info "See https://docs.joinpeertube.org/maintain-tools?id=prune-storagejs for more"
silence
sub_npm "prune-storage"
sub_npm prune-storage
unsilence
success "Storage pruned - don't forget to restart your Peertube instance!"
}
sub_regen_thumb() {
sub_npm regenerate-thumbnails
unsilence
success "Storage pruned!"
}
+23 -9
View File
@@ -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.1.0-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}
@@ -51,7 +55,7 @@ services:
volumes:
- app-data:/data
- app-config:/config
- app-assets:/app/client/dist
- app-assets:/srv/client/dist
secrets:
- db_password
configs:
@@ -59,11 +63,19 @@ services:
target: /docker-entrypoint.sh
mode: 0555
command: npm start
healthcheck:
test: 'nodejs -e "http.get(''http://localhost:9000/api/v1/ping'', (res) => { console.log(''status: '', res.statusCode); if (res.statusCode == 200) { process.exit(0); } else { process.exit(1); } });"'
interval: 1m
timeout: 30s
retries: 3
start_period: 1m
entrypoint: /docker-entrypoint.sh
networks:
- internal
deploy:
labels: ['coop-cloud.${STACK_NAME}.app.version=v3.1.0-buster-455af623']
labels:
- "coop-cloud.${STACK_NAME}.version=2.2.0+v4.2.2-bullseye"
db:
image: postgres:10-alpine
environment:
@@ -76,20 +88,19 @@ services:
- postgres-data:/var/lib/postgresql/data
networks:
- internal
deploy:
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:
@@ -98,6 +109,7 @@ volumes:
nginx-cache:
postgres-data:
redis-data:
configs:
nginx_config:
name: ${STACK_NAME}_nginx_config_${NGINX_CONFIG_VERSION}
@@ -105,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
+12 -3
View File
@@ -26,9 +26,18 @@ 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
cp -ar /app/client/dist /srv/client
# upstream entrypoint
# https://github.com/Chocobozzz/PeerTube/blob/66f77f63437c6774acbd72584a9839a7636ea167/support/docker/production/entrypoint.sh
+10 -3
View File
@@ -39,7 +39,14 @@ http {
try_files /dev/null @api;
}
location = /api/v1/videos/upload {
location = /api/v1/videos/upload-resumable {
client_max_body_size 0;
proxy_request_buffering off;
try_files /dev/null @api;
}
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.
@@ -126,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
View 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