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
Romain Courteaud
slapos
Commits
317abe56
Commit
317abe56
authored
Oct 11, 2022
by
Boxiang Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
peertube: configuration
parent
295430b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
8 deletions
+21
-8
software/peertube/instance.cfg.in
software/peertube/instance.cfg.in
+21
-8
No files found.
software/peertube/instance.cfg.in
View file @
317abe56
...
...
@@ -7,9 +7,9 @@ parts =
promise-redis
postgresql
postgresql-extension
peertube-configuration-1
nginx-service
nginx-listen-promise
peertube-configuration-1
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
...
...
@@ -35,13 +35,25 @@ ssl = $${:etc}/ssl
recipe = slapos.recipe.build
production_config_template = ${peertube:location}/config/production.yaml.example
production_config_prod = $${directory:config}/production.yaml
default_yaml = ${peertube:location}/config/default.yaml
default_yaml_prod = $${directory:config}/default.yaml
nginx_config = ${peertube:location}/support/nginx/peertube
nginx_config_prod = ${peertube:location}/support/nginx/peertube
install =
import shutil
shutil.copyfile(options['production_config_template'], options['production_config_prod'])
with open(options['production_config_prod'], encoding='UTF-8') as f:
content = f.read()
print(content)
f.close()
shutil.copyfile(options['default_yaml'], options['default_yaml_prod'])
shutil.copyfile(options['default_yaml'], options['default_yaml_prod'])
with open(options['production_config_template'], "r", encoding='utf-8') as exmaple_file:
with open(options['production_config_prod'], "w", encoding='utf-8') as prod_file:
for line in exmaple_file:
if "hostname: 'example.com'" in line:
line = line.replace("example.com", "https://[$${nginx-configuration:ip}]/$${nginx-configuration:port}")
if "password: 'peertube'" in line:
line = line.replace("peertube", "$${postgresql:password}")
print("Fuck!!!")
print(line)
prod_file.write(line)
# content = content.replace(old_content, new_content)
...
...
@@ -142,8 +154,9 @@ unixsocket = $${:server-dir}/redis.socket
ipv6 = ::1
port = 0
server-bin = {{ redis_binprefix }}/redis-server
cli-bin = {{ redis_binprefix }}/redis-cli
# server-bin = ${buildout:parts-directory}/redis/bin/redis-server
server-bin = ${redis28:location}/bin/redis-server
cli-bin = ${redis28:location}/bin/redis-cli
depend =
$${logrotate-entry-redis:recipe}
...
...
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