MetaTube Sever Deployment 

Create Metatube User And Database

sudo -u postgres psql
CREATE USER metatube WITH PASSWORD 'metatube';
CREATE DATABASE metatube OWNER metatube;
GRANT ALL PRIVILEGES ON DATABASE metatube TO metatube;

Change PostgreSQL Authentication Method

sudo nano /etc/postgresql/pg_hba.conf
# TYPE  DATABASE        USER            ADDRESS                 METHOD
local   all             postgres                                peer map=pg_root
local   all             all                                     md5

There Are Several Usual Methmod:
trust
Access the database whatever they specify.
password Sends the password in clear-text.
md5 Sends the password in MD5 encryption.
scram-sha-256 Sends the password in scram-sha-256 encryption. (some client may not support it.)

sudo systemctl restart pgsql.service

Docker Compose

version: "3"
services:
    metatube:
        image: metatube/metatube-server:latest
        container_name: metatube
        ports:
            - 8090:8080
        restart: unless-stopped
        environment:
            - HTTP_PROXY=
            - HTTPS_PROXY=
        volumes:
            - /var/run:/var/run
        command: -dsn "postgres://metatube:metatube@/metatube?host=/var/run/postgresql" -port 8080 -db-auto-migrate -db-prepared-stmt

Leave a Comment