mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat: add update option
This commit is contained in:
parent
cb03b153ac
commit
7027f39c48
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
install_dokploy() {
|
||||
if [ "$(id -u)" != "0" ]; then
|
||||
echo "This script must be run as root" >&2
|
||||
exit 1
|
||||
@ -11,7 +11,6 @@ if [ "$(uname)" = "Darwin" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# check if is running inside a container
|
||||
if [ -f /.dockerenv ]; then
|
||||
echo "This script must be run on Linux" >&2
|
||||
@ -109,4 +108,23 @@ echo ""
|
||||
printf "${GREEN}Congratulations, Dokploy is installed!${NC}\n"
|
||||
printf "${BLUE}Wait 15 seconds for the server to start${NC}\n"
|
||||
printf "${YELLOW}Please go to http://${formatted_addr}:3000${NC}\n\n"
|
||||
echo ""
|
||||
}
|
||||
|
||||
update_dokploy() {
|
||||
echo "Updating Dokploy..."
|
||||
|
||||
# Pull the latest image
|
||||
docker pull dokploy/dokploy:latest
|
||||
|
||||
# Update the service
|
||||
docker service update --image dokploy/dokploy:latest dokploy
|
||||
|
||||
echo "Dokploy has been updated to the latest version."
|
||||
}
|
||||
|
||||
# Main script execution
|
||||
if [ "$1" = "update" ]; then
|
||||
update_dokploy
|
||||
else
|
||||
install_dokploy
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user