You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you use bash frequently for caprover, here are some useful aliases
alias capinit="docker run -p 80:80 -p 443:443 -p 3000:3000 -v /var/run/docker.sock:/var/run/docker.sock -v /captain:/captain caprover/caprover:latest"alias capvol="docker volume ls | grep captain"# All caprover volumes# Start caprover or start an app in caprover# Example: capstart mongo (starts mongo)# capstart (starts caprover)functioncapstart {
if [ -z$1 ]
then
docker service scale captain-captain=1
else
docker service scale srv-captain--$1=1
fi
}
alias capstart='capstart'# Stop caprover or stop an app in caprover# Example: capstop mongo (stops mongo)# capstop (stops caprover)functioncapstop {
if [ -z$1 ]
then
docker service scale captain-captain=0
else
docker service scale srv-captain--$1=0
fi
}
alias capstop='capstop'# Restart caprover or restart an app in caprover# Example: caprestart mongo (restarts mongo)# caprestart (restarts caprover)functioncaprestart {
capstop $1
capstart $1
}
alias caprestart='caprestart'# Force kill caproverfunctioncapkill {
(docker service ls -q)
if [ $?-ne 0 ];then
docker service rm $(docker service ls -q)echo"All docker services deleted"elseecho"No active docker services"fi
docker swarm leave --force
}
# Polls logs for container or caprover itself# Example: caplogs mongo (logs for mongo)# caplogs (logs for caprover)functioncaplogs {
if [ -z$1 ]
then
docker service logs captain-captain -f
elif [[ $1=="nginx"||$1=="certbot" ]];then
docker service logs captain-$1 -f
else
docker service logs srv-captain--$1 -f
fi
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
If you use bash frequently for caprover, here are some useful aliases
Beta Was this translation helpful? Give feedback.
All reactions