fix paths, dont write local-production.json

This commit is contained in:
Felix Ableitner 2020-09-15 12:48:32 +02:00
parent 90d3f0fb61
commit a17f03ea59
3 changed files with 7 additions and 156 deletions

View File

@ -1,125 +0,0 @@
{
"instance": {
"name": "Peertube.social",
"short_description": "Peertube instance for leftist and non-commercial content. Unlimited uploads (up to 500 MB per day)",
"description": "Please follow [@peertubesocial](https://radical.town/@peertubesocial) for news and announcements about this instance. You can also join us on [Lemmy](https://dev.lemmy.ml/c/peertube) for discussions.\n\nIf you like this instance, please consider donating via [Liberapay](https://en.liberapay.com/Peertube.social/).\n\nWe are experimenting with small batches of registrations. If signups are closed, it is to prevent spam bot accounts. We are waiting for PeerTube to implement some measure to prevent automated signups, like [issue #1946](https://github.com/Chocobozzz/PeerTube/issues/1946) or[issue #2242](https://github.com/Chocobozzz/PeerTube/issues/2242)",
"is_nsfw": false,
"default_nsfw_policy": "do_not_list",
"terms": "By using Peertube.social you agree to the following terms. These terms may be updated at any time, and you are responsible for checking forupdates periodically.\n\n- *No Illegal Content*\nThe instance is hosted in Germany. Any content that violates German law is forbidden. This includes copyright infringement, child pornography and others. Violating this rule will result in a permanent ban.\n\n- *No Commercial Content*\nAdvertisements are forbidden. Videos funded through donations are acceptable, and requesting donations is also acceptable.\n\n- *No Fascist Content*\nThis includes (but is not limited to) use of fascist iconography and support for or defense of fascist movements.\n\n- *No Anti-Communist Content*\nThis includes (but is not limited to) condemning communism or socialism or supporting anticommunist propaganda. \n\n- *No Bigotry or Hate Speech*\nSexism, Racism, LGBTphobia, Xenophobia, and discrimination or hate speech against minorities are not tolerated and will result in a ban. Content criticizing Bigotry or Hate Speech must provide sufficient warning.\n\n- *No Spam*\nUploads are limited to 500 MB per day. Submitting abnormally large amounts of videos or comments in a short time may be considered spam and is forbidden.\n\n- *Not Safe For Work (NSFW) Content*\nNSFW content is allowed, but pornography and extreme violence is forbidden. NSFW content must be marked as such to allow it to be filtered by other users. Pornographic content is allowed from other instances so long as it is properly marked as NSFW.\n\n- *No Data Scraping*\nYou are not allowed to scrape or analyze any data from this instance without explicit permission from the administrator.\n\nUsers of Peertube.social are responsible for all content posted from or uploaded to their account.\n\nAll decisions are to the discretion of the moderators.",
"code_of_conduct": "By using this instance you agree to the following Code of Conduct:\n\n- No illegal content.\n- No bigotry or hate speech, including racism, sexism, homophobia, and transphobia.\n- No spam.\n- No Harassment.\n- All NSFW content must be marked as such, and pornography is not allowed.\n- No comercial, fascist, or anti-communist content.\n- No data scraping.\n\nComments and videos which violate our ToS or CoC will be deleted, and the user will be dealt with at the moderators discretion.\n\nNote that \"reverse\"-isms are not against our CoC (e.g. \"reverse racism\", misandry, etc).\n\nPeerTube does not currently support reporting comments. If you see a comment which violates our Code of Conduct please contact us through the \"Contact Administrator\" button on our [About page](https://peertube.social/about) or by messaging us on Mastodon. Moderator @ handles can be found in the Moderatorsection.",
"creation_reason": "",
"moderation_information": "Peertube.social is moderated by [@felix](https://radical.town/@felix), [@autom](https://octodon.social/@autom), [@niquarl](https://mastodon.social/@Niquarl), and [@lesbianhacker](https://radical.town/@lesbianhacker).",
"administrator": "",
"maintenance_lifetime": "",
"business_model": "",
"hardware_information": "This instance is hosted on a 2 CPU VPS, with 4 GB RAM and 40 GB disk space ([CX21 on this page](https://www.hetzner.com/cloud)). For video storage I am using a [Hetzner storage box](https://www.hetzner.com/storage/storage-box). The RAM and disk space are more than enough, but faster CPU would always be better to speed up transcoding. Outgoing traffic is roughly 1 TB per month. Total cost is about 23 € per month (including backups and domain renewal). The instance config (with Ansible and docker-compose) is [available here](https://yerbamate.dev/nutomic/peertube-compose).\n",
"categories": [
14,
1,
11,
15,
8
],
"languages": [
"es",
"de",
"en",
"sv",
"da",
"no",
"eo"
],
"default_client_route": "/videos/local",
"customizations": {
"javascript": "",
"css": ".video-miniature .views {\n display: none;\n}\n.create-an-account {\n display: none;\n}\n.create-account-button {\n display: none !important;\n}"
}
},
"theme": {
"default": "default"
},
"services": {
"twitter": {
"username": "@Chocobozzz",
"whitelisted": false
}
},
"cache": {
"previews": {
"size": 1000000
},
"captions": {
"size": 50000
}
},
"signup": {
"enabled": true,
"limit": 10000,
"requires_email_verification": true
},
"import": {
"videos": {
"http": {
"enabled": true
},
"torrent": {
"enabled": false
}
}
},
"admin": {
"email": "info@peertube.social"
},
"contact_form": {
"enabled": true
},
"user": {
"video_quota": -1,
"video_quota_daily": 524288000
},
"transcoding": {
"enabled": true,
"threads": 2,
"allow_additional_extensions": true,
"allow_audio_files": true,
"resolutions": {
"0p": true,
"240p": true,
"360p": true,
"480p": true,
"720p": true,
"1080p": true,
"2160p": false
},
"hls": {
"enabled": false
},
"webtorrent": {
"enabled": true
}
},
"auto_blacklist": {
"videos": {
"of_users": {
"enabled": true
}
}
},
"followers": {
"instance": {
"enabled": true,
"manual_approval": true
}
},
"followings": {
"instance": {
"auto_follow_back": {
"enabled": false
},
"auto_follow_index": {
"enabled": false,
"index_url": "https://instances.joinpeertube.org"
}
}
}
}

View File

@ -28,10 +28,9 @@
- name: copy files
copy: src={{item.src}} dest={{item.dest}} mode={{item.mode}} force={{item.force}}
with_items:
- { src: 'files/docker-daemon.json', dest: '/etc/docker/daemon.json', mode: '0644', force: 'yes' }
- { src: 'files/local-production.json', dest: '/peertube/volumes/config/local-production.json', mode: '0644', force: 'yes' }
- { src: 'files/send-email-to-users.bash', dest: '/peertube/send-email-to-users.bash', mode: '755', force: 'yes' }
- { src: 'files/email-template.txt', dest: '/peertube/email-template.txt', mode: '0644', force: 'no' }
- { src: '../files/docker-daemon.json', dest: '/etc/docker/daemon.json', mode: '0644', force: 'yes' }
- { src: '../files/send-email-to-users.bash', dest: '/peertube/send-email-to-users.bash', mode: '755', force: 'yes' }
- { src: '../files/email-template.txt', dest: '/peertube/email-template.txt', mode: '0644', force: 'no' }
- name: get latest peertube version from github
uri:
@ -51,10 +50,10 @@
- name: add all template files
template: src={{item.src}} dest={{item.dest}} mode={{item.mode}}
with_items:
- { src: 'templates/docker-compose.yml.j2', dest: '/peertube/docker-compose.yml', mode: '0644' }
- { src: 'templates/nginx.conf.j2', dest: '/peertube/nginx.conf', mode: '0644' }
- { src: 'templates/env.j2', dest: '/peertube/.env', mode: '0600' }
- { src: 'templates/peertube-production.yaml.j2', dest: '/peertube/volumes/config/production.yaml', mode: '0600' }
- { src: '../templates/docker-compose.yml.j2', dest: '/peertube/docker-compose.yml', mode: '0644' }
- { src: '../templates/nginx.conf.j2', dest: '/peertube/nginx.conf', mode: '0644' }
- { src: '../templates/env.j2', dest: '/peertube/.env', mode: '0600' }
- { src: '../templates/peertube-production.yaml.j2', dest: '/peertube/volumes/config/production.yaml', mode: '0600' }
vars:
peertube_version: "{{ peertube_version_response.json.tag_name }}"

View File

@ -74,29 +74,6 @@ trending:
videos:
interval_days: 7 # Compute trending videos for the last x days
# Cache remote videos on your server, to help other instances to broadcast the video
# You can define multiple caches using different sizes/strategies
# Once you have defined your strategies, choose which instances you want to cache in admin -> manage follows -> following
redundancy:
videos:
check_interval: '1 hour' # How often you want to check new videos to cache
strategies:
-
size: '20GB'
# Minimum time the video must remain in the cache. Only accept values > 10 hours (to not overload remote instances)
min_lifetime: '12 hours'
strategy: 'most-views' # Cache videos that have the most views
-
size: '20GB'
# Minimum time the video must remain in the cache. Only accept values > 10 hours (to not overload remote instances)
min_lifetime: '12 hours'
strategy: 'trending' # Cache trending videos
-
size: '0GB'
# Minimum time the video must remain in the cache. Only accept values > 10 hours (to not overload remote instances)
min_lifetime: '24 hours'
strategy: 'recently-added' # Cache recently added videos
min_views: 10 # Having at least x views
csp:
enabled: true