restart docker only install

This commit is contained in:
Darren 2023-12-07 17:18:32 +08:00 committed by GitHub
parent ab6d247549
commit ecb9f62118
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 5 deletions

View file

@ -47,7 +47,8 @@ services:
- DISABLE_SSH=true
- RUN_MODE=prod
- HTTP_PORT=3000
- DISABLE_REGISTRATION=false
- DISABLE_REGISTRATION=true
- GITEA__server__OFFLINE_MODE=true
- REQUIRE_SIGNIN_VIEW=false
- ROOT_URL=http://localhost/w9git/
labels:

View file

@ -2,10 +2,17 @@
## Development
From official Gitea image, and:
### What do done?
From official Gitea image, we have complete these modification:
- Complete install wizard automaticlly by enviroment INSTALL_LOCK
- Use default URL localhost for Host/Root_URL settings
- create administrator user
### Environments
Any app.ini items can set by environment, refer to [Managing Deployments With Environment Variables](https://docs.gitea.com/installation/install-with-docker#managing-deployments-with-environment-variables)
## User

View file

@ -1,3 +1,6 @@
# This file only for your reference, it maybe not always update
# it from: https://github.com/go-gitea/gitea/blob/main/custom/conf/app.example.ini
APP_NAME = gitea
RUN_MODE = prod
RUN_USER = git

View file

@ -362,7 +362,10 @@ set_docker(){
sudo systemctl stop firewalld
sudo systemctl disable firewalld
fi
sudo systemctl restart docker
if [ "$execute_mode" = "install" ]; then
sudo systemctl restart docker
fi
}
install_backends() {
@ -484,7 +487,9 @@ if [ $? -ne 0 ]; then
fi
echo "Restart Docker for Firewalld..."
sudo systemctl restart docker
if [ "$execute_mode" = "install" ]; then
sudo systemctl restart docker
fi
endtime=$(date +%s)
runtime=$((endtime-starttime))

View file

@ -162,4 +162,7 @@ fi
echo -e "\n\n-------- Docker --------"
Upgrade_Docker
Start_Docker
if [ -z "$execute_mode" ] || [ "$execute_mode" = "install" ]; then
Start_Docker
fi