Docker URL-Shortener yourls + sqlite

date
May 8, 2022
slug
newservice-yourls-with-sqlite
status
Published
summary
新服务 短链接自建服务 Docker
tags
service
type
Post
URL
notion image

Summary

    notion image

    步骤

     
    mkdir /data/yourls-sqlite
    cd /data/yourls-sqlite
    
    mkdir sqlite
    # solve permission issue; otherwise, db error
    chown -R www-data:www-data . && chmod -R 766 .
    
    export DOCKER_USER='yourls'
    export DOCKER_PASSWORD='7AL7e6E49'
    echo \
    docker run --name yourls-sqlite-short \
        --restart=always \
        -e YOURLS_SITE="https://short.nine.im" \
        -e YOURLS_DB_NAME="sqlite/yourls" \
        -e YOURLS_USER=${DOCKER_USER} \
        -e YOURLS_PASS=${DOCKER_PASSWORD} \
        -e TZ=Asia/Hong_Kong \
        -e PUID=$(id -u www-data) -e PGID=$(id -g www-data) \
        -v $(pwd)/sqlite:/var/www/html/user/sqlite \
        -p 18090:80 -d niduroki/yourls-sqlite:1.8

    反代到18090即可

    验证


    © Ying Bun 2021 - 2024