steccas / docker-yourls

Dockerize YOURLS service (Shorten URL Service)

Home Page:https://hub.docker.com/r/guessi/docker-yourls/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dockerize YOURLS - Your Own URL Shortener

Docker Stars Docker Pulls Docker Automated

Before start, things you need to know...

Difference between Official Build and why this project exist?

Back in 2017, I was a user of YOURLS (Great thanks to upstream maintainers). I found it's hard to build YOURLS into container image so I publish my customized YOURLS image build and scripts on May 7, 2017. Around half year later, upstream YOURLS maintainers published an official repo called "YOURLS/docker" to build container images for YOURLS project on Nov 11, 2017. So it became two different image repositories.

Should I use it or maybe Official build is better?

Ideally, official build should receive better support and it is always encourage to try Official Build first. The main differences between two projects is the way image build and w/wo plugins pre-loaded.

As time goes by, please take this project as a quick start guide for YOURLS and please don't get me wrong, I'm not pushing you away (existed users), if you still like this project? it is always welcome to stay here :-)

Integrated Items

Integrated Plugins

Usage

To run YOURLS service with customized config

$ vim env.mysql
$ vim env.yourls
$ docker-compose up [--build] [-d]

Dashboard

Advanced

Create database backup

Execute backup.sh to get regular backup

Restore backup from backup file

Make sure there is no container running

$ docker-compose down
$ docker ps

Cleanup "mysql-data" volume

$ docker volume rm yourls_mysql-data

Make sure there is no sql file under "mysql-initdb" volume

$ rm -vf ./volumes/docker-entrypoint-initdb.d/*

Move the backup sql file to "mysql-initdb" volume

$ cp -vf ./mysql-dump-YYYYMMDD-hhmmss.sql ./volumes/docker-entrypoint-initdb.d/
$ docker-compose up -d

FAQ

How can I use non-default password or variables?

simply modify the variables inside `env.*` before your first run.

Limitations for environment files

* The value of `YOURLS_DB_PASS` inside `env.yourls` **SHOULD BE** exactly the same as `MYSQL_PASSWORD` in `env.mysql`.
* The value of `YOURLS_DB_USER` inside `env.yourls` **SHOULD BE**  exactly the same as `MYSQL_USER` in `env.mysql.
* All variables inside `env.mysql` and `env.yourls` **SHOULD NOT** contain `'=' (equal sign)`, `' ' (space)`, `'#' (number sign)`.

Known Issue

WebUI may show Could not write file .htaccess in YOURLS root directory. at first time deployment, it is actually a false alarm, please ignore it.

WebUI may show Could not auto-encrypt passwords. when log into admin page, it is Docker specific limitation, see YOURLS wiki for more detail

About

Dockerize YOURLS service (Shorten URL Service)

https://hub.docker.com/r/guessi/docker-yourls/


Languages

Language:PHP 58.8%Language:Dockerfile 28.9%Language:Shell 12.3%