Add local-production.json, add docs about the different config files

This commit is contained in:
Felix Ableitner 2020-04-02 11:22:12 +02:00
parent 8dcd5f75eb
commit a0528dc1af
3 changed files with 143 additions and 4 deletions

View file

@ -14,3 +14,13 @@ ansible-playbook peertube.yml --ask-vault-pass
If you want to use this configuration for your own instance, you need to fork this repo and enter your own domain in
`prod` and in `group_vars/prod.yml`. You also need to change the encrypted variables in the latter file. After that,
you can run the playbook to deploy your instance.
## File Overview
- `peertube.yml`: The Ansible playbook, configures the server and copies config files
- `files/docker-daemon.json`: Configuration for Docker, to limit stored logs
- `files/local-production.json`: Peertube configuration, things like custom css, about page, transcoding options, etc
- `templates/docker-compose.yml.j2`: List of Docker images and their versions
- `templates/env.j2`: Various environment variables
- `templates/nginx.conf.j2`: Config for the nginx reverse proxy
- `templates/peertube-production.yaml.j2`: Peertube config, things like ports, email server, redundancy settings, etc

125
files/local-production.json Normal file
View file

@ -0,0 +1,125 @@
{
"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

@ -18,14 +18,18 @@
apt:
pkg: ['docker-compose', 'docker.io', 'certbot']
- name: copy docker config
copy: src='files/docker-daemon.json' dest='/etc/docker/daemon.json' mode='0644'
- name: create peertube folder
- name: create peertube folders
file: path={{item.path}} state=directory
with_items:
- { path: '/peertube/volumes/' }
- { path: '/peertube/volumes/certbot/' }
- { path: '/peertube/volumes/config/' }
- name: copy docker config
copy: src={{item.src}} dest={{item.dest}} mode='0644'
with_items:
- { src: 'files/docker-daemon.json', dest: '/etc/docker/daemon.json' }
- { src: 'files/local-production.json', dest: '/peertube/volumes/config/local-production.json' }
- name: get latest peertube version from github
uri: