Commit 432fc553 authored by Naoki Kosaka's avatar Naoki Kosaka

Latest PeerTube.

parents
config
storage
\ No newline at end of file
FROM ubuntu
RUN apt update && apt install -y ffmpeg openssl g++ make redis-server git curl unzip && \
curl -sL https://deb.nodesource.com/setup_8.x | bash - && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt update && apt install -y nodejs yarn
WORKDIR /var/www/peertube
RUN useradd -b /var/www/peertube -s /bin/sh peertube && \
chown peertube:peertube /var/www/peertube
USER peertube
RUN PEERTUBE_VER=$(curl -s https://api.github.com/repos/chocobozzz/peertube/releases/latest | grep tag_name | cut -d '"' -f 4) && echo "Latest Peertube version is $PEERTUBE_VER" && \
curl -sL "https://github.com/Chocobozzz/PeerTube/releases/download/$PEERTUBE_VER/peertube-$PEERTUBE_VER.zip" > peertube-$PEERTUBE_VER.zip && \
unzip -q peertube-$PEERTUBE_VER.zip && \
rm peertube-$PEERTUBE_VER.zip && \
mv peertube-$PEERTUBE_VER peertube-latest
WORKDIR /var/www/peertube/peertube-latest
RUN yarn install --production --pure-lockfile && \
yarn cache clean
ENV NODE_ENV=production
ENV NODE_CONFIG_DIR=/var/www/peertube/config
VOLUME [ "/var/www/peertube/config", "/var/www/peertube/storage" ]
CMD [ "/usr/bin/npm", "start" ]
listen:
port: 9000
# Correspond to your reverse proxy "listen" configuration
webserver:
https: true
hostname: 'example.com'
port: 443
# Your database name will be "peertube"+database.suffix
database:
hostname: 'db'
port: 5432
suffix: '_prod'
username: 'peertube'
password: 'peertube'
redis:
hostname: 'redis'
port: 6379
auth: null
smtp:
hostname: null
port: 465
username: null
password: null
tls: true
ca_file: null # Used for self signed certificates
from_address: '[email protected]'
# From the project root directory
storage:
avatars: '/var/www/peertube/storage/avatars/'
videos: '/var/www/peertube/storage/videos/'
logs: '/var/www/peertube/storage/logs/'
previews: '/var/www/peertube/storage/previews/'
thumbnails: '/var/www/peertube/storage/thumbnails/'
torrents: '/var/www/peertube/storage/torrents/'
cache: '/var/www/peertube/storage/cache/'
log:
level: 'info' # debug/info/warning/error
###############################################################################
#
# From this point, all the following keys can be overriden by the web interface
# (local-production.json file). If you need to change some values, prefer to
# use the web interface because the configuration will be automatically
# reloaded without any need to restart PeerTube.
#
# /!\ If you already have a local-production.json file, the modification of the
# following keys will have no effect /!\.
#
###############################################################################
cache:
previews:
size: 100 # Max number of previews you want to cache
admin:
email: '[email protected]'
signup:
enabled: false
limit: 10 # When the limit is reached, registrations are disabled. -1 == unlimited
user:
# Default value of maximum video BYTES the user can upload (does not take into account transcoded files).
# -1 == unlimited
video_quota: -1
# If enabled, the video will be transcoded to mp4 (x264) with "faststart" flag
# Uses a lot of CPU!
transcoding:
enabled: true
threads: 1
resolutions: # Only created if the original video has a higher resolution
240p: false
360p: false
480p: false
720p: false
1080p: false
instance:
name: 'PeerTube'
description: '' # Support markdown
terms: '' # Support markdown
default_client_route: '/videos/trending'
customizations:
javascript: '' # Directly your JavaScript code (without <script> tags). Will be eval at runtime
css: '' # Directly your CSS code (without <style> tags). Will be injected at runtime
version: '2.3'
services:
db:
image: postgres:alpine
restart: always
volumes:
- ./postgres:/var/lib/postgresql/data
environment:
POSTGRES_USER: peertube
POSTGRES_PASSWORD: peertube
POSTGRES_DB: peertube_prod
redis:
image: redis:alpine
restart: always
volumes:
- ./redis:/data
app:
build: .
image: yukimochi/peertube:latest
restart: always
ports:
- "9000:9000"
depends_on:
- db
- redis
volumes:
- ./config:/var/www/peertube/config
- ./storage:/var/www/peertube/storage
\ No newline at end of file
# Peertube - Federated (ActivityPub) video streaming platform
## Usage
````
git clone https://github.com/yukimochi-containers/PeerTube.git
cd PeerTube
vi config/production.yaml # Edit config
sudo docker-compose up -d
````
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment