mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-10 15:26:10 -06:00
Bash script install and uninstall for Docker
This commit is contained in:
parent
15aca28ce2
commit
f0279bb883
45
install.sh
Normal file
45
install.sh
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "================================================"
|
||||||
|
echo "----------------- Openclassify -----------------"
|
||||||
|
echo "----- Automated install script with Docker -----"
|
||||||
|
echo "================================================"
|
||||||
|
|
||||||
|
if [[ $(which docker) && $(docker --version) ]]; then
|
||||||
|
docker --version
|
||||||
|
else
|
||||||
|
#if ubuntu install docker
|
||||||
|
if [ -n "$(uname -a | grep Ubuntu)" ]; then
|
||||||
|
sudo apt-get install -y \
|
||||||
|
apt-transport-https \
|
||||||
|
ca-certificates \
|
||||||
|
curl \
|
||||||
|
software-properties-common
|
||||||
|
curl -fsSL https://yum.dockerproject.org/gpg | sudo apt-key add -
|
||||||
|
sudo add-apt-repository \
|
||||||
|
"deb https://apt.dockerproject.org/repo/ \
|
||||||
|
ubuntu-$(lsb_release -cs) \
|
||||||
|
main"
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get -y install docker-engine
|
||||||
|
# add current user to docker group so there is no need to use sudo when running docker
|
||||||
|
sudo usermod -aG docker $(whoami)
|
||||||
|
else
|
||||||
|
echo "Install docker and come back later"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
cp -u .env-sail .env
|
||||||
|
|
||||||
|
#docker compose build
|
||||||
|
#--no-cache
|
||||||
|
|
||||||
|
docker compose up --force-recreate -d
|
||||||
|
|
||||||
|
docker exec -it oc_php php artisan install --ready
|
||||||
|
|
||||||
|
#php artisan migrate --all-addons --force
|
||||||
|
|
||||||
|
#composer config http-basic.abc.aaa.com openclassify pass
|
||||||
|
#composer config repositories.repo-name composer https://abc.aaa.com
|
||||||
7
uninstall.sh
Normal file
7
uninstall.sh
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "|| ## Openclassify ## || "
|
||||||
|
echo "|| Removing Bye bye || "
|
||||||
|
|
||||||
|
docker compose down -v
|
||||||
|
# TODO @fatihalp
|
||||||
Loading…
Reference in New Issue
Block a user