generated from coop-cloud/example
Compare commits
10
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d999fb0867 | ||
|
|
3687802f12
|
||
|
|
be091cd685
|
||
|
|
fc15241ec5
|
||
|
|
60137256d4
|
||
|
|
6e52231d18
|
||
|
|
e79f3cf0cc
|
||
|
|
0fe43fc444
|
||
|
|
488b58f955
|
||
|
|
dc5585ac6e
|
@@ -45,3 +45,6 @@ SECRET_DB_PASSWORD_VERSION=v1
|
||||
|
||||
## Live chat settings
|
||||
#PEERTUBE_LIVE_CHAT_ENABLED=1
|
||||
|
||||
## Healthcheck settings
|
||||
PEERTUBE_LOG_PING_REQUESTS=false
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# shellcheck disable=SC2034,SC2145
|
||||
|
||||
export NGINX_CONFIG_VERSION=v4
|
||||
export NGINX_CONFIG_VERSION=v3
|
||||
export APP_ENTRYPOINT_VERSION=v5
|
||||
|
||||
sub_npm() {
|
||||
|
||||
+31
-9
@@ -24,9 +24,21 @@ services:
|
||||
configs:
|
||||
- source: nginx_config
|
||||
target: /etc/nginx/nginx.conf
|
||||
healthcheck:
|
||||
test: curl -f http://app:9000/v1/api/ping || exit 1
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 20
|
||||
deploy:
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
update_config:
|
||||
failure_action: rollback
|
||||
order: start-first
|
||||
rollback_config:
|
||||
order: start-first
|
||||
restart_policy:
|
||||
max_attempts: 10
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=80"
|
||||
@@ -35,7 +47,7 @@ services:
|
||||
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
||||
|
||||
app:
|
||||
image: chocobozzz/peertube:v4.2.2-bullseye
|
||||
image: chocobozzz/peertube:v4.3.0-bullseye
|
||||
environment:
|
||||
- PEERTUBE_ADMIN_EMAIL
|
||||
- PEERTUBE_CONTACT_FORM_ENABLED
|
||||
@@ -44,6 +56,7 @@ services:
|
||||
- PEERTUBE_DB_PORT=5432
|
||||
- PEERTUBE_DB_USERNAME=peertube
|
||||
- PEERTUBE_LIVE_CHAT_ENABLED
|
||||
- PEERTUBE_LOG_PING_REQUESTS
|
||||
- PEERTUBE_REDIS_HOSTNAME=cache
|
||||
- PEERTUBE_SIGNUP_ENABLED
|
||||
- PEERTUBE_SMTP_ENABLED
|
||||
@@ -62,19 +75,18 @@ services:
|
||||
- source: app_entrypoint
|
||||
target: /docker-entrypoint.sh
|
||||
mode: 0555
|
||||
command: npm start
|
||||
command: node dist/server
|
||||
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
|
||||
test: curl -f http://localhost:9000/v1/api/ping || exit 1
|
||||
interval: 10s
|
||||
timeout: 3s
|
||||
retries: 20
|
||||
entrypoint: /docker-entrypoint.sh
|
||||
networks:
|
||||
- internal
|
||||
deploy:
|
||||
labels:
|
||||
- "coop-cloud.${STACK_NAME}.version=2.2.0+v4.2.2-bullseye"
|
||||
- "coop-cloud.${STACK_NAME}.version=3.0.0+v4.3.0-bullseye"
|
||||
|
||||
db:
|
||||
image: postgres:10-alpine
|
||||
@@ -88,13 +100,23 @@ services:
|
||||
- postgres-data:/var/lib/postgresql/data
|
||||
networks:
|
||||
- internal
|
||||
healthcheck:
|
||||
test: pg_isready -U peertube
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
cache:
|
||||
image: redis:4-alpine
|
||||
image: redis:7-alpine
|
||||
volumes:
|
||||
- redis-data:/data
|
||||
networks:
|
||||
- internal
|
||||
healthcheck:
|
||||
test: redis-cli ping
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
networks:
|
||||
internal:
|
||||
|
||||
+3
-3
@@ -46,7 +46,7 @@ http {
|
||||
try_files /dev/null @api;
|
||||
}
|
||||
|
||||
location ~ ^/api/v1/videos/(upload|([^/]+/editor/edit))$ {
|
||||
location = /api/v1/videos/upload {
|
||||
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|default-playlist\.jpg|default-avatar-account\.png|default-avatar-video-channel\.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))$ {
|
||||
add_header Cache-Control "public, max-age=31536000, immutable"; # Cache 1 year
|
||||
|
||||
root /var/www/peertube;
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
Redis needs to be ugpraded to >= 6 and you can't downgrade afterwards, so
|
||||
beware!
|
||||
|
||||
-- @decentral1se / Autonomic
|
||||
Reference in New Issue
Block a user