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
295430b2
Commit
295430b2
authored
Oct 10, 2022
by
Boxiang Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
peertube: Add redis service
parent
341424cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
65 additions
and
5 deletions
+65
-5
software/peertube/instance.cfg.in
software/peertube/instance.cfg.in
+65
-5
No files found.
software/peertube/instance.cfg.in
View file @
295430b2
...
@@ -3,8 +3,11 @@ extends =
...
@@ -3,8 +3,11 @@ extends =
${monitor-template:output}
${monitor-template:output}
parts =
parts =
service-redis
promise-redis
postgresql
postgresql
postgresql-extension
postgresql-extension
peertube-configuration-1
nginx-service
nginx-service
nginx-listen-promise
nginx-listen-promise
...
@@ -23,17 +26,34 @@ www = $${:srv}/www
...
@@ -23,17 +26,34 @@ www = $${:srv}/www
varnginx = $${:var}/nginx
varnginx = $${:var}/nginx
services = $${:etc}/service
services = $${:etc}/service
peertube_directory = $${:srv}/var/www/peertube
peertube_directory = $${:srv}/var/www/peertube
config = $${:
srv}/var
/www/peertube/config
config = $${:
var}
/www/peertube/config
storage = $${:
srv}/var
/www/peertube/storage
storage = $${:
var}
/www/peertube/storage
versions = $${:
srv}/var
/www/peertube/versions
versions = $${:
var}
/www/peertube/versions
ssl = $${:etc}/ssl
ssl = $${:etc}/ssl
[peertube-instance]
[peertube-configuration-1]
recipe = slapos.recipe.build
production_config_template = ${peertube:location}/config/production.yaml.example
production_config_prod = $${directory:config}/production.yaml
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()
# content = content.replace(old_content, new_content)
[peertube-configuration]
recipe = slapos.cookbook:wrapper
recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:services}/$${:_buildout_section_name_}
wrapper-path = $${directory:services}/$${:_buildout_section_name_}
command-line = echo "Hello!"
command-line = echo "Hello!"
cd ${peertube:location}
cp ${peertube:location}/config/production.yaml.example ${peertube:location}/config/production.yaml
# Change config/production.yaml
# Change config/production.yaml
# ehco $${directory:versions}
environment =
environment =
PATH=${unzip:location}/bin:${vim:location}/bin:${nodejs:location}/bin:${yarn:location}/bin:${python3:location}/bin:${nginx:location}/sbin:${postgresql:location}/sbin:${gcc-10.2:location}/bin:${redis:location}/bin:{git:location}/bin:{wget:location}/bin:%(PATH)s
PATH=${unzip:location}/bin:${vim:location}/bin:${nodejs:location}/bin:${yarn:location}/bin:${python3:location}/bin:${nginx:location}/sbin:${postgresql:location}/sbin:${gcc-10.2:location}/bin:${redis:location}/bin:{git:location}/bin:{wget:location}/bin:%(PATH)s
CPPFLAGS=-I${openssl:location}/include
CPPFLAGS=-I${openssl:location}/include
...
@@ -98,6 +118,46 @@ ssl_key = $${directory:ssl}/nginx.key
...
@@ -98,6 +118,46 @@ ssl_key = $${directory:ssl}/nginx.key
ssl_csr = $${directory:ssl}/nginx.csr
ssl_csr = $${directory:ssl}/nginx.csr
ssl_crt = $${directory:ssl}/nginx.crt
ssl_crt = $${directory:ssl}/nginx.crt
#############
# Redis #
#############
[redis]
recipe = slapos.cookbook:mkdirectory
srv = $${directory:srv}/redis
log = $${directory:log}/redis
[service-redis]
recipe = slapos.cookbook:redis.server
wrapper = $${directory:services}/redis
promise-wrapper = $${directory:bin}/redis-promise
server-dir = $${redis:srv}
config-file = $${directory:etc}/redis.conf
log-file = $${redis:log}/redis.log
pid-file = $${directory:run}/redis.pid
use-passwd = false
unixsocket = $${:server-dir}/redis.socket
# port = 0 means "don't listen on TCP at all" - listen only on unix socket
ipv6 = ::1
port = 0
server-bin = {{ redis_binprefix }}/redis-server
cli-bin = {{ redis_binprefix }}/redis-cli
depend =
$${logrotate-entry-redis:recipe}
[promise-redis]
<= monitor-promise-base
promise = check_command_execute
name = promise-redis.py
config-command = $${service-redis:promise-wrapper}
[logrotate-entry-redis]
<= logrotate-entry-base
log = $${redis:log}/*.log
name = redis
#################################
#################################
# SlapOS service
# SlapOS service
#################################
#################################
...
...
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