mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-25 09:00:26 +00:00
install_new.sh
This commit is contained in:
parent
f89f72b6da
commit
b4d849f135
6 changed files with 45 additions and 18 deletions
|
@ -1,3 +1,8 @@
|
|||
#!/bin/bash
|
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
|
||||
export PATH
|
||||
|
||||
InstallDocker
|
||||
|
||||
|
||||
InstallDocker(){
|
||||
|
|
|
@ -1,35 +1,44 @@
|
|||
#!/bin/bash
|
||||
# Define PATH
|
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
|
||||
# Export PATH
|
||||
export PATH
|
||||
|
||||
# Define error_exit function
|
||||
function error_exit {
|
||||
echo "$1" 1>&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Trap ERR signal and call error_exit function
|
||||
trap 'error_exit "Please push issue to: https://github.com/Websoft9/stackhub/issues"' ERR
|
||||
|
||||
# Define environments
|
||||
install_path="/data"
|
||||
# Define vars
|
||||
install_path="/data/websoft9"
|
||||
urls="https://w9artifact.blob.core.windows.net/release/websoft9"
|
||||
if [[ "$1" == "dev" ]]; then
|
||||
echo "update by dev artifacts"
|
||||
echo "update by dev artifact"
|
||||
urls="https://w9artifact.blob.core.windows.net/dev/websoft9"
|
||||
fi
|
||||
|
||||
# Download and extract source code
|
||||
wget $urls/websoft9.latest && unzip websoft9.latest $install_path
|
||||
|
||||
# Install runtime
|
||||
curl https://websoft9.github.io/websoft9/install/install_tools.sh | bash
|
||||
curl https://websoft9.github.io/websoft9/install/install_docker.sh | bash
|
||||
|
||||
|
||||
# Install Cockpit and plugins
|
||||
curl https://websoft9.github.io/websoft9/install/install_cockpit.sh | bash
|
||||
curl https://websoft9.github.io/websoft9/install/install_plugins.sh | bash
|
||||
|
||||
|
||||
# Install backend service
|
||||
wget $urls/websoft9.latest && unzip websoft9.latest $install_path
|
||||
cd websoft9/docker
|
||||
cd $install_path/docker
|
||||
sudo docker network create websoft9
|
||||
sudo docker compose -p websoft9 up -d
|
||||
sudo docker-compose -p websoft9 up -d
|
||||
|
||||
# Install Systemd service
|
||||
cd $install_path/websoft9/systemd
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable websoft9.service
|
||||
sudo systemctl start websoft9
|
|
@ -1,12 +1,12 @@
|
|||
|
||||
#!/bin/bash
|
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
|
||||
export PATH
|
||||
|
||||
InstallPlugins
|
||||
|
||||
|
||||
urls="https://w9artifact.blob.core.windows.net/release/websoft9"
|
||||
if [[ "$1" == "dev" ]]; then
|
||||
echo "update by dev artifacts"
|
||||
urls="https://w9artifact.blob.core.windows.net/dev/websoft9"
|
||||
fi
|
||||
|
||||
|
||||
### -----------------------------------------------------###
|
||||
|
||||
InstallPlugins(){
|
||||
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
#!/bin/bash
|
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
|
||||
export PATH
|
||||
|
||||
InstallTools
|
||||
|
||||
### -----------------------------------------------------###
|
||||
|
||||
InstallTools(){
|
||||
|
||||
echo "Prepare to install Tools ..."
|
||||
|
|
5
systemd/README.md
Normal file
5
systemd/README.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Systemd
|
||||
|
||||
This is the Websoft9 system service that run some proxy services on the host machine for Websoft9 to solve the problem that the API cannot handle.
|
||||
|
||||
- Copy credentials from one other containers to apphub container
|
|
@ -5,8 +5,8 @@ After=network.target docker
|
|||
|
||||
[Service]
|
||||
KillSignal=SIGQUIT
|
||||
WorkingDirectory=/data/develop/stackhub/api
|
||||
ExecStart=python3 uvicorn main:app --reload
|
||||
WorkingDirectory=/data/websoft9
|
||||
ExecStart=bash send_credentials.sh
|
||||
Restart=always
|
||||
Type=notify
|
||||
NotifyAccess=all
|
||||
|
|
Loading…
Reference in a new issue