Skip to content

Niduroki/docker-yourls-sqlite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

YOURLS 1.9 with SQLite

Based on Flameborn/yourls-sqlite.

Takes the same arguments as the official container, but ignores the ones that are unnecessary.
Additionally there is a /var/www/html/user/sqlite volume, you should either bind to the local fs, or at least name.

Important notice / change (2022-02-01)

The YOURLS_DB_NAME must be defined, and must be prepended with a sqlite/ (due to simplifying and removing the custom docker-entrypoint.sh), otherwise the database is not written into the persistent volume, and data will be lost on restarting the container!

If you have updated this container, and your data seems to be lost: No worries, it's still there!
Prepend sqlite/ to your existing YOURLS_DB_NAME, or, if you have not defined a custom YOURLS_DB_NAME define it as YOURLS_DB_NAME=sqlite/yourls.

Notes for installation

The folder bound to this container must be owned by the user 33, otherwise it will not be able to write a SQLite db into it. This can be accomplished by doing a

chown -R 33:33 yourls-sqlite

on the folder.

Example command-line

docker run --name yourls-but-sqlite \
    -e YOURLS_SITE="https://exam.pl" \
    -e YOURLS_DB_NAME="sqlite/yourls" \
    -e YOURLS_USER="myuser" \
    -e YOURLS_PASS="secretpassword" \
    -v yourls-sqlite:/var/www/html/user/sqlite \
    -p 80:80 -d niduroki/yourls-sqlite:1.9

MIT-Licensed.