Compare commits

..
11 Commits
Author SHA1 Message Date
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
4 changed files with 39 additions and 17 deletions
+16 -14
View File
@@ -1,24 +1,26 @@
export NGINX_CONFIG_VERSION=v1
export APP_ENTRYPOINT_VERSION=v1
# shellcheck disable=SC2034,SC2145
export NGINX_CONFIG_VERSION=v2
export APP_ENTRYPOINT_VERSION=v2
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
unsilence
success "Storage pruned - don't forget to restart your Peertube instance!"
}
sub_npm "prune-storage"
sub_regen_thumb() {
sub_npm regenerate-thumbnails
unsilence
success "Storage pruned!"
}
+12 -3
View File
@@ -33,7 +33,7 @@ services:
- "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:v3.2.1-buster
environment:
- PEERTUBE_ADMIN_EMAIL
- PEERTUBE_CONTACT_FORM_ENABLED
@@ -51,7 +51,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 +59,17 @@ 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}.app.version=v3.2.1-buster-e4f797ee"]
db:
image: postgres:10-alpine
environment:
@@ -77,6 +83,9 @@ services:
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
+4
View File
@@ -30,6 +30,10 @@ if [ -z "$PEERTUBE_SMTP_ENABLED" ]; then
file_env "PEERTUBE_SMTP_PASSWORD"
fi
# 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
/usr/local/bin/entrypoint.sh "$@"
+7
View File
@@ -39,6 +39,13 @@ http {
try_files /dev/null @api;
}
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 {
limit_except POST HEAD { deny all; }