1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-23 01:39:27 +02:00

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 ## docker-compose.yml
```yaml ```yaml
version: '3.1' version: '3.8'
services: services:
yourls: yourls:
image: yourls image: yourls:1.7
ports: ports:
- "8080:80" - "8080:80"
environment: environment:
@ -26,7 +26,7 @@ services:
- YOURLS_SITE=https://yourls.easypi.pro - YOURLS_SITE=https://yourls.easypi.pro
depends_on: depends_on:
- mysql - mysql
restart: always restart: unless-stopped
mysql: mysql:
image: mysql:5.7 image: mysql:5.7
@ -35,7 +35,7 @@ services:
environment: environment:
- MYSQL_ROOT_PASSWORD=root - MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=yourls - MYSQL_DATABASE=yourls
restart: always restart: unless-stopped
``` ```
## Up and Running ## 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 $ 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/ [1]: http://yourls.org/

View File

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