修改data 位置

This commit is contained in:
chinky 2018-07-09 17:19:03 +08:00
parent 984583e356
commit b90b073240
3 changed files with 4 additions and 3 deletions

View File

@ -22,6 +22,7 @@ echo "备份到 ${backup_path}/${backup_filename} ..."
sudo tar -zcpf ${backup_path}/${backup_filename} gitea
sudo chown git:users ${backup_path} -R
echo "备份完毕."
cd ..
echo "启动 Gitea ..."
cd $(dirname ${BASH_SOURCE:-$0})
docker-compose up -d

View File

@ -27,7 +27,7 @@ services:
networks:
- gitea
volumes:
- /data/gitea:/data
- ./data/gitea:/data
ports:
- "3000:3000"
- "22:22"

View File

@ -34,7 +34,7 @@ case $answer in
echo "恢复备份 \"${dump_filename}\" 中 ..."
mkdir -p ./data
cd data
sudo mv gitea $(date "+gitea.%Y%m%d%H%M%S")
sudo mv gitea $(date "+gitea%Y%m%d%H%M%S")
sudo tar -zxf ${backup_path}/${dump_filename}
echo "恢复完毕."
echo "启动 Gitea ..."