Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
slapos
Commits
0c2b290b
Commit
0c2b290b
authored
Nov 04, 2022
by
Boxiang Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
peertube: host fixup
parent
24be540a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
6 deletions
+23
-6
software/peertube/instance.cfg.in
software/peertube/instance.cfg.in
+19
-2
software/peertube/template-nginx.cfg.in
software/peertube/template-nginx.cfg.in
+1
-1
software/peertube/template-peertube.yaml.in
software/peertube/template-peertube.yaml.in
+3
-3
No files found.
software/peertube/instance.cfg.in
View file @
0c2b290b
...
...
@@ -10,6 +10,7 @@ parts =
nginx-service
peertube-service
publish-connection-parameter
peertube-urlparse
nginx-listen-promise
peertube-listen-promise
...
...
@@ -163,7 +164,7 @@ name = PeerTube Server Frontend
software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
slave = true
config-type = websocket
config-websocket-path-list = /socket.io /
tracker
config-websocket-path-list = /socket.io /
socket /tracker/socket
config-url = https://[$${nginx-configuration:ip}]:$${nginx-configuration:port}
return = domain secure_access
...
...
@@ -194,8 +195,24 @@ init =
options['business_model'] = options['slapparameter-dict'].get('business_model') or ''
options['hardware_information'] = options['slapparameter-dict'].get('hardware_information') or ''
[peertube-urlparse]
recipe = slapos.recipe.build
slapparameter-dict = $${slap-configuration:configuration}
url = $${publish-connection-parameter:frontend-url}
init =
from six.moves.urllib.parse import urlparse
url = urlparse(options.get('url'))
if url.port:
options['host'] = '\'[' + url.hostname + '\']'
options['port'] = url.port
else:
options['host'] = url.hostname
options['port'] = 443
[publish-connection-parameter]
recipe = slapos.cookbook:publish
frontend-url = $${frontend:connection-secure_access}
frontend-hostname = $${frontend:connection-domain}
frontend
-port = 9000
ipv4
-port = 9000
software/peertube/template-nginx.cfg.in
View file @
0c2b290b
...
...
@@ -51,7 +51,7 @@ http {
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
upstream backend {
server $${instance-parameter:ipv4-random}:$${publish-connection-parameter:
frontend
-port};
server $${instance-parameter:ipv4-random}:$${publish-connection-parameter:
ipv4
-port};
}
server {
...
...
software/peertube/template-peertube.yaml.in
View file @
0c2b290b
listen:
hostname: '$${instance-parameter:ipv4-random}'
port: $${publish-connection-parameter:
frontend
-port}
port: $${publish-connection-parameter:
ipv4
-port}
# Correspond to your reverse proxy server_name/listen configuration (i.e., your public PeerTube instance URL)
webserver:
https: true
hostname: '$${p
ublish-connection-parameter:frontend-hostname
}'
port:
443
hostname: '$${p
eertube-urlparse:host
}'
port:
$${peertube-urlparse:port}
# Secrets you need to generate the first time you run PeerTube
secrets:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment