1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-24 08:52:31 +02:00

update yourls

This commit is contained in:
kev 2019-02-28 15:10:14 +08:00
parent 77263a3909
commit e3b0a9f547

View File

@ -5,7 +5,40 @@ yourls
that will allow you to run your own URL shortening service (a la TinyURL or
Bitly).
# Up and Running
## docker-compose.yml
```yaml
version: '3.1'
services:
yourls:
image: yourls
ports:
- "8080:80"
environment:
- YOURLS_DB_HOST=mysql
- YOURLS_DB_USER=root
- YOURLS_DB_PASS=root
- YOURLS_DB_NAME=yourls
- YOURLS_USER=admin
- YOURLS_PASS=admin
- YOURLS_SITE=https://yourls.easypi.pro
depends_on:
- mysql
restart: always
mysql:
image: mysql:5.7
volumes:
- ./data:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=yourls
restart: always
```
## Up and Running
```bash
$ docker-compose up -d
@ -28,4 +61,10 @@ $yourls_user_passwords = [
];
```
## Backup Database
```bash
$ docker-compose exec -T mysql mysqldump -uroot -proot yourls > yourls-$(date +\%F).sql
```
[1]: http://yourls.org/