update yourls

This commit is contained in:
kev 2020-06-02 16:40:14 +08:00
parent 881030988e
commit 6fe0149e5e
2 changed files with 18 additions and 8 deletions

View File

@ -8,12 +8,12 @@ Bitly).
## docker-compose.yml
```yaml
version: '3.1'
version: '3.8'
services:
yourls:
image: yourls
image: yourls:1.7
ports:
- "8080:80"
environment:
@ -26,7 +26,7 @@ services:
- YOURLS_SITE=https://yourls.easypi.pro
depends_on:
- mysql
restart: always
restart: unless-stopped
mysql:
image: mysql:5.7
@ -35,7 +35,7 @@ services:
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=yourls
restart: always
restart: unless-stopped
```
## Up and Running
@ -71,4 +71,14 @@ $ docker-compose exec -T mysql mysqldump -uroot -proot yourls > yourls-$(date +%
$ docker exec -i yourls_mysql_1 mysql -uroot -proot yourls < yourls-$(date +%F -d yesterday).sql
```
## Upgrade Image
- backup config.php
- backup plugins
- remove container (with volume)
- create container
- restore plugins
- restore config.php
- restart container
[1]: http://yourls.org/

View File

@ -1,9 +1,9 @@
version: '3.1'
version: '3.8'
services:
yourls:
image: yourls
image: yourls:1.7
ports:
- "8080:80"
environment:
@ -16,7 +16,7 @@ services:
- YOURLS_SITE=https://yourls.easypi.pro
depends_on:
- mysql
restart: always
restart: unless-stopped
mysql:
image: mysql:5.7
@ -25,4 +25,4 @@ services:
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=yourls
restart: always
restart: unless-stopped