- Assuming you already have Docker and Docker Compose installed
0. Change your database user and password in env-mysql.env
and env-yourls.env
- You should see following 3 kinds of success log
- YOURLS init
YOURLS | YOURLS init... YOURLS | YOURLS init done! YOURLS exited with code 0
- MySQL init
yourls-database | update db user privileges yourls-database | MySQL init done! yourls-database exited with code 0
- Finish and shutdown
Init complete Removing YOURLS ... done Removing yourls-database ... done Removing network docker_intranet-init-yourls
- YOURLS init
- If things failed, try to increase delay time (POSTPONE_FOR_A_WHILE=60s)
- E.g., set to
90s
or longer - Note that you have to remove old failed database before retry
- E.g., set to
- Set flags in
docker-compose-init.yml
as needed- Set
INIT_INSTALL_RECOMMENDED_PLUGINS=true
to install plugins recommended (and revise) by me - Set
INIT_ENABLE_GITLAB_OAUTH_SUPPORT=true
to add (GitLab) OAuth support
- Set
- Now, you can visit
http://localhost/admin/index.php
to start using YOURLS - Remember to change domain setting in both Nginx config and YOURLS
- Note that
config-docker.php
will be copied as/docker/deploy/yourls/user/config.php
, so change that file after running0-init.sh
rather than modifyconfig-docker.php
itself - Also remember to replace default user as your own ones; otherwise, it may be dangerous
- Note that
- Answer
Y
toWarning!! (Permanently) REMOVE folders for yourls and database? [y/N]
if you want to Remove Database and YOURLS - Otherwise, answer
N
orPress Enter
to keep data
- The main point is that MySQL chane their policy on authentication method
- The critical script is
cmd-mysql.sh
for this project#L15
is the original entrypoint, which will initialize the database#L16
is for commandps
andpkill
in alpine#L17
is the delay time for former works to get ready#L18
is to kill the original mysqld#L20
is to create a newmysqld_safe
with flag--skip-grant-tables
#L26-L29
are to enablemysql_native_password
for user
- The critical script is
This project is licensed under the following 3 licenses, YOURLS, MIT, and EPL
- YOURLS: aka
Do whatever the hell you want with it
- MIT: aka
MadeInTaiwan Licence
ฅ• ω •ฅ - EPL: aka
EPL Public License
, where EPL stands for EmbeddedPlatformLab (like GNU or YAML, quite cool, huh?)
Feel free to modify it to your own version as needed
Contact me if having any comments :D