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
7668569f
Commit
7668569f
authored
Sep 23, 2022
by
Boxiang Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try to configure peertube in slapos
parent
8b67a094
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
10 deletions
+63
-10
software/peertube/buildout.hash.cfg
software/peertube/buildout.hash.cfg
+17
-0
software/peertube/instance.cfg.in
software/peertube/instance.cfg.in
+42
-2
software/peertube/software.cfg
software/peertube/software.cfg
+4
-8
No files found.
software/peertube/buildout.hash.cfg
0 → 100644
View file @
7668569f
# THIS IS NOT A BUILDOUT FILE, despite purposedly using a compatible syntax.
# The only allowed lines here are (regexes):
# - "^#" comments, copied verbatim
# - "^[" section beginings, copied verbatim
# - lines containing an "=" sign which must fit in the following categorie.
# - "^\s*filename\s*=\s*path\s*$" where "path" is relative to this file
# Copied verbatim.
# - "^\s*hashtype\s*=.*" where "hashtype" is one of the values supported
# by the re-generation script.
# Re-generated.
# - other lines are copied verbatim
# Substitution (${...:...}), extension ([buildout] extends = ...) and
# section inheritance (< = ...) are NOT supported (but you should really
# not need these here).
[instance-profile]
filename = instance.cfg.in
# md5sum = 483b76d8e6bf72d72a38a3f7bf66fe08
software/peertube/instance.cfg.in
View file @
7668569f
[buildout]
parts =
directory
publish-connection-parameter
[directory]
[peertube-instance]
recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:service}/$${:_buildout_section_name_}
command-line = sh -c "cd $${directory:versions}; cp -r ${peertube-download:location} ./;
# peertube yarn install --production --pure-lockfile"
# cp peertube-latest/config/default.yaml config/default.yaml
# cp peertube-latest/config/production.yaml.example config/production.yaml
# cp /var/www/peertube/peertube-latest/support/nginx/peertube /etc/nginx/sites-available/peertube
# sed -i 's/${WEBSERVER_HOST}/[peertube-domain]/g' /etc/nginx/sites-available/peertube
# sed -i 's/${PEERTUBE_HOST}/127.0.0.1:9000/g' /etc/nginx/sites-available/peertube
[directory]
recipe = slapos.cookbook:mkdirectory
srv = $${buildout:directory}/srv
var = $${:srv}/var
...
...
@@ -11,3 +22,32 @@ peertube_directory = ${:www}/peertube
config = $${:peertube_directory}/config
storage = $${:peertube_directory}/storage
versions = $${:peertube_directory}/versions
[postgresql-password]
recipe = slapos.cookbook:generate.password
bytes = 24
[postgresql]
recipe = slapos.cookbook:postgres
bin = ${postgresql10:location}/bin/
services = $${directory:service}
dbname = peertube_prod
superuser = peertube
password = $${postgresql-password:passwd}
pgdata-directory = $${directory:srv}/postgresql
ipv4 = $${instance-parameter:ipv4-random}
# disable listening on ipv6
ipv6 =
port = 5432
[postgresql-extension]
recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:bin}/$${:_buildout_section_name_}
command-line =
$${postgresql:bin}/psql -c "CREATE EXTENSION pg_trgm;" $${postgresql:dbname}
$${postgresql:bin}/psql -c "CREATE EXTENSION unaccent;" $${postgresql:dbname}
[publish-connection-parameter]
recipe = slapos.cookbook:publish
url = $${peertube-instance:url}
software/peertube/software.cfg
View file @
7668569f
...
...
@@ -48,26 +48,22 @@ parts =
git
wget
# peetube sections
#
peertube-download
postgresql-setup
peertube-download
#
postgresql-setup
[nodejs]
<= nodejs-16.13.2
[peertube-download]
recipe = slapos.recipe.build:download
recipe = slapos.recipe.build:download
-unpacked
url = https://github.com/Chocobozzz/PeerTube/releases/download/v4.2.2/peertube-v4.2.2.zip
destination = ${directory:versions}
#
destination = ${directory:versions}
# md5sum =
[instance-profile]
# The <= is buildout verb to use defined template
<= jinja-template
rendered = ${buildout:directory}/instance.cfg
extensions = jinja2.ext.do
context =
section buildout buildout
raw template_monitor ${monitor2-template:rendered}
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