Skip to content
프로젝트

소개

Dockerize YOURLS service (Shorten URL Service)

시스템 및 인프라

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

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

Container image tag Mobile-Detect version PHP version OS version Remark
1.10.6-0 (alias of 1.10.6) 4.11.0 PHP 8.5 Debian 13 Build with PHP 8.5, Debian 13
1.9.2-11 (alias of 1.9.2) 3.74.3 PHP 8.3 Debian 12 Final 1.9.2 build, php.ini-production
1.9.2-10 3.74.3 PHP 8.3 Debian 12 No code change, regular re-build

Integrated Plugins

Usage

[!IMPORTANT] You should always change the default username/password pairs for both MySQL and YOURLS.

[!WARNING] docker-compose.yaml uses mysql:8.4 since 1.10.6. An existing mysql-data volume created by mysql:5.7 can not be reused directly. Run backup.sh with the old stack first, then follow Restore backup from backup file on the new one.

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

Why there would have no homepage for YOURLS?

Check the answer at the link below
- https://github.com/orgs/YOURLS/discussions/3638#discussioncomment-7192119

How can I use non-default password or variables?

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

Limitations for environment files

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

Why it will show Could not auto-encrypt passwords. when log into admin page?

Check the FAQ for YOURLS for more details
- https://yourls.org/docs/guide/essentials/credentials#faq

Why it will show Could not write file .htaccess in YOURLS root directory.?

It should only happen at 1st time deployment, you may safely ignore it.

Any others?

Here are some useful links for you
- https://yourls.org/docs
- https://yourls.org/docs/category/troubleshooting
- https://github.com/orgs/YOURLS/discussions

관련 프로젝트 살펴보기

불러오는 중…