mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 01:39:37 +02:00
Add ability to customize instance logo
This commit is contained in:
parent
f5fd593976
commit
c0f4de6077
96 changed files with 1910 additions and 532 deletions
|
@ -1076,6 +1076,55 @@ paths:
|
|||
'204':
|
||||
description: successful operation
|
||||
|
||||
'/api/v1/config/instance-logo/:logoType/pick':
|
||||
post:
|
||||
summary: Update instance logo
|
||||
security:
|
||||
- OAuth2:
|
||||
- admin
|
||||
tags:
|
||||
- Config
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/logoTypeParam'
|
||||
responses:
|
||||
'204':
|
||||
description: successful operation
|
||||
'413':
|
||||
description: image file too large
|
||||
headers:
|
||||
X-File-Maximum-Size:
|
||||
schema:
|
||||
type: string
|
||||
format: Nginx size
|
||||
description: Maximum file size for the banner
|
||||
requestBody:
|
||||
content:
|
||||
multipart/form-data:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
logofile:
|
||||
description: The file to upload.
|
||||
type: string
|
||||
format: binary
|
||||
encoding:
|
||||
logofile:
|
||||
contentType: image/png, image/jpeg
|
||||
|
||||
'/api/v1/config/instance-logo/:logoType':
|
||||
delete:
|
||||
summary: Delete instance logo
|
||||
security:
|
||||
- OAuth2:
|
||||
- admin
|
||||
tags:
|
||||
- Config
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/logoTypeParam'
|
||||
responses:
|
||||
'204':
|
||||
description: successful operation
|
||||
|
||||
/api/v1/custom-pages/homepage/instance:
|
||||
get:
|
||||
summary: Get instance custom homepage
|
||||
|
@ -8022,7 +8071,17 @@ components:
|
|||
not valid anymore and you need to initialize a new upload.
|
||||
schema:
|
||||
type: string
|
||||
|
||||
logoTypeParam:
|
||||
name: logoType
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- 'favicon'
|
||||
- 'header-wide'
|
||||
- 'header-square'
|
||||
- 'opengraph'
|
||||
|
||||
securitySchemes:
|
||||
OAuth2:
|
||||
|
@ -9156,10 +9215,10 @@ components:
|
|||
type: number
|
||||
description: "**PeerTube >= 6.1** Frames per second of the video file"
|
||||
width:
|
||||
type: number
|
||||
type: integer
|
||||
description: "**PeerTube >= 6.1** Video stream width"
|
||||
height:
|
||||
type: number
|
||||
type: integer
|
||||
description: "**PeerTube >= 6.1** Video stream height"
|
||||
createdAt:
|
||||
type: string
|
||||
|
@ -9170,6 +9229,9 @@ components:
|
|||
type: string
|
||||
width:
|
||||
type: integer
|
||||
height:
|
||||
type: integer
|
||||
description: "**PeerTube >= 7.3** ImportVideosInChannelCreate:mage height"
|
||||
createdAt:
|
||||
type: string
|
||||
format: date-time
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
# Check config/production.yaml.example in PeerTube repository for more details/available configuration
|
||||
|
||||
listen:
|
||||
hostname: '0.0.0.0'
|
||||
port: 9000
|
||||
|
||||
# Correspond to your reverse proxy server_name/listen configuration (i.e., your public PeerTube instance URL)
|
||||
webserver:
|
||||
https: true
|
||||
hostname: undefined
|
||||
|
@ -10,23 +11,17 @@ webserver:
|
|||
|
||||
rates_limit:
|
||||
login:
|
||||
# 15 attempts in 5 min
|
||||
window: 5 minutes
|
||||
max: 15
|
||||
ask_send_email:
|
||||
# 3 attempts in 5 min
|
||||
window: 5 minutes
|
||||
max: 3
|
||||
|
||||
# Proxies to trust to get real client IP
|
||||
# If you run PeerTube just behind a local proxy (nginx), keep 'loopback'
|
||||
# If you run PeerTube behind a remote proxy, add the proxy IP address (or subnet)
|
||||
trust_proxy:
|
||||
- 'loopback'
|
||||
- 'linklocal'
|
||||
- 'uniquelocal'
|
||||
|
||||
# Your database name will be database.name OR 'peertube'+database.suffix
|
||||
database:
|
||||
hostname: 'postgres'
|
||||
port: 5432
|
||||
|
@ -35,7 +30,6 @@ database:
|
|||
username: 'postgres'
|
||||
password: 'postgres'
|
||||
|
||||
# Redis server for short time storage
|
||||
redis:
|
||||
hostname: 'redis'
|
||||
port: 6379
|
||||
|
@ -43,8 +37,8 @@ redis:
|
|||
|
||||
# From the project root directory
|
||||
storage:
|
||||
tmp: '../data/tmp/' # Use to download data (imports etc), store uploaded files before and during processing...
|
||||
tmp_persistent: '../data/tmp-persistent/' # As tmp but the directory is not cleaned up between PeerTube restarts
|
||||
tmp: '../data/tmp/'
|
||||
tmp_persistent: '../data/tmp-persistent/'
|
||||
bin: '../data/bin/'
|
||||
avatars: '../data/avatars/'
|
||||
web_videos: '../data/web-videos/'
|
||||
|
@ -59,17 +53,8 @@ storage:
|
|||
captions: '../data/captions/'
|
||||
cache: '../data/cache/'
|
||||
plugins: '../data/plugins/'
|
||||
uploads: '../data/uploads/'
|
||||
well_known: '../data/well-known/'
|
||||
# Overridable client files in client/dist/assets/images:
|
||||
# - logo.svg
|
||||
# - favicon.png
|
||||
# - default-playlist.jpg
|
||||
# - default-avatar-account.png
|
||||
# - default-avatar-video-channel.png
|
||||
# - and icons/*.png (PWA)
|
||||
# Could contain for example assets/images/favicon.png
|
||||
# If the file exists, peertube will serve it
|
||||
# If not, peertube will fallback to the default file
|
||||
client_overrides: '../data/client-overrides/'
|
||||
|
||||
|
||||
|
@ -79,7 +64,7 @@ object_storage:
|
|||
private: null
|
||||
|
||||
log:
|
||||
level: 'info' # 'debug' | 'info' | 'warn' | 'error'
|
||||
level: 'info'
|
||||
|
||||
tracker:
|
||||
enabled: true
|
||||
|
|
|
@ -190,7 +190,7 @@ server {
|
|||
|
||||
# Bypass PeerTube for performance reasons. Optional.
|
||||
# Should be consistent with client-overrides assets list in client.ts server controller
|
||||
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-account-48x48\.png|default-avatar-video-channel\.png|default-avatar-video-channel-48x48\.png))$ {
|
||||
location ~ ^/client/(assets/images/(default-playlist\.jpg|default-avatar-account\.png|default-avatar-account-48x48\.png|default-avatar-video-channel\.png|default-avatar-video-channel-48x48\.png))$ {
|
||||
add_header Cache-Control "public, max-age=31536000, immutable"; # Cache 1 year
|
||||
|
||||
root /var/www/peertube;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue