Docker+Traefik快速安装PlayTube

网站所有资源都有,可联系VX:kanyingvip

PlayTube是一个收费的视频CMS系统,功能齐全,并且支持FFMPEG转码。

演示站24h删除:https://wp.233.fi/

这个是1.7.1版本,我从某毛子站上下载来的nulled版本,有无后门自测。。这里只介绍安装方式。

安装docker和docker-compose:

apt -y update
apt -y install curl
curl -sSL https://get.docker.com/ | sh
systemctl start docker
systemctl enable docker
curl -L https://github.com/docker/compose/releases/download/1.25.4/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

创建需要用到的目录和文件:

mkdir -p /opt/traefik && mkdir -p /opt/playtube
touch /opt/traefik/acme.json && chmod 600 /opt/traefik/acme.json

创建traefik的配置文件:

nano /opt/traefik/traefik.toml

写入如下配置(邮箱替换成你自己的):

defaultEntryPoints = ["https","http"]

[entryPoints]
  [entryPoints.http]
  address = ":80"
    [entryPoints.http.redirect]
    entryPoint = "https"
  [entryPoints.https]
  address = ":443"
  [entryPoints.https.tls]

[acme]
email = "example@qq.com"
storage = "acme.json"
entryPoint = "https"
onHostRule = true
[acme.httpChallenge]
entryPoint = "http"

创建traefik的docker-compose:

nano /opt/traefik/docker-compose.yml

写入下面的内容:

version: '3.5'

services:
    reverse-proxy:
      container_name: traefik
      image: traefik:v1.7
      command: --api --docker
      ports:
        - "80:80"
        - "443:443"
      networks:
        - traefik
      volumes:
        - /var/run/docker.sock:/var/run/docker.sock
        - /opt/traefik/traefik.toml:/traefik.toml
        - /opt/traefik/acme.json:/acme.json

networks:
    traefik:
      name: imlala

进入到docker-compose.yml所在的目录up起来即可完成traefik的配置:

cd /opt/traefik
docker-compose up -d

进入到playtube目录,下载源码/解压:

apt -y install wget unzip
cd /opt/playtube
wget https://cute.233.fi/s/EdWKNGosMZWjNfS/download -O playtube.zip
unzip playtube.zip

给予正确的文件权限(否则视频无法正常上传):

chmod -R 777 playtube/upload
chmod -R 777 playtube/config.php
chmod -R 777 playtube/nodejs/config.json

创建playtube的docker-compose:

nano docker-compose.yml

写入如下内容:

version: '3.5'

services: 
    playtube-web:
        container_name: playtube-web
        image: webdevops/php-apache:debian-10
        environment: 
            - WEB_DOCUMENT_ROOT=/app
            - PHP_MEMORY_LIMIT=1024M
            - PHP_MAX_EXECUTION_TIME=7200
            - PHP_POST_MAX_SIZE=10240M
            - PHP_UPLOAD_MAX_FILESIZE=10240M
            - FPM_MAX_REQUESTS=500
            - FPM_PM_MAX_CHILDREN=20
            - FPM_PM_START_SERVERS=10
            - FPM_PM_MIN_SPARE_SERVERS=5
            - FPM_PM_MAX_SPARE_SERVERS=15
        labels: 
            - "traefik.frontend.rule=Host:wp.233.fi"
        volumes: 
            - ./playtube:/app
        restart: unless-stopped

    playtube-db:
        container_name: playtube-db
        image: mariadb
        environment: 
            - MYSQL_ROOT_PASSWORD=
            - MYSQL_PASSWORD=
            - MYSQL_DATABASE=playtube
            - MYSQL_USER=playtube
        labels: 
            - "traefik.enable=false"
        volumes: 
            - ./db:/var/lib/mysql
        restart: unless-stopped

networks:
    default:
        external:
            name: imlala

1.其中wp.233.fi域名换成你自己的。

2.MYSQL_ROOT_PASSWORD=设置你的数据库ROOT密码,MYSQL_PASSWORD=设置你的数据库用户密码。

确认无误后up起来:

docker-compose up -d

访问你的域名,如果没有问题的话,环境检测这里应该是全部OK的:

图片[1]-Docker+Traefik快速安装PlayTube-天时网

安装的时候,数据库主机名必须填写和下图一样:

图片[2]-Docker+Traefik快速安装PlayTube-天时网

在容器内安装FFMPEG:

docker exec -it playtube-web bash
apt -y update
apt -y install ffmpeg

后台FFMPEG路径填写:

/usr/bin/ffmpeg

如图所示:

图片[3]-Docker+Traefik快速安装PlayTube-天时网.

 

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容