forked from coop-cloud/peertube
Compare commits
10
Commits
v3.2.1-buster
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e2b4d39fe2 | ||
|
|
31520c2cb1 | ||
|
|
99011f0df7 | ||
|
|
95aa921e4e | ||
|
|
fe7aace9d7 | ||
|
|
a23e16d632 | ||
|
|
f986064092 | ||
|
|
04408f007a | ||
|
|
406afdb8cf | ||
|
|
046286d266 |
@@ -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!"
|
||||
}
|
||||
|
||||
+10
-1
@@ -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,6 +59,12 @@ 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
|
||||
@@ -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
|
||||
|
||||
@@ -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 "$@"
|
||||
|
||||
@@ -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; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user