From 6fe0149e5e2d5e92102a5d2afa3ac4b5584dbd1a Mon Sep 17 00:00:00 2001 From: kev Date: Tue, 2 Jun 2020 16:40:14 +0800 Subject: [PATCH] update yourls --- yourls/README.md | 18 ++++++++++++++---- yourls/docker-compose.yml | 8 ++++---- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/yourls/README.md b/yourls/README.md index 7f556f8..a452da9 100644 --- a/yourls/README.md +++ b/yourls/README.md @@ -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/ diff --git a/yourls/docker-compose.yml b/yourls/docker-compose.yml index 9c9bf56..07756c6 100644 --- a/yourls/docker-compose.yml +++ b/yourls/docker-compose.yml @@ -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