mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-02-03 01:28:39 +08:00
docker
This commit is contained in:
parent
b4d849f135
commit
276b25403d
@ -2,7 +2,7 @@ version: "3.8"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
apphub:
|
apphub:
|
||||||
image: websoft9dev/apphub:$APP_VERSION
|
image: websoft9dev/apphub:$APPHUB_VERSION
|
||||||
container_name: websoft9-apphub
|
container_name: websoft9-apphub
|
||||||
ports:
|
ports:
|
||||||
- 127.0.0.1:9001:8080
|
- 127.0.0.1:9001:8080
|
||||||
@ -17,7 +17,7 @@ services:
|
|||||||
- proxy
|
- proxy
|
||||||
|
|
||||||
deployment:
|
deployment:
|
||||||
image: websoft9dev/deployment:2.19.0
|
image: websoft9dev/deployment:$DEPLOYMENT_VERSION
|
||||||
container_name: websoft9-deployment
|
container_name: websoft9-deployment
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
@ -29,7 +29,7 @@ services:
|
|||||||
com.docker.compose.w9_http.port: 9000
|
com.docker.compose.w9_http.port: 9000
|
||||||
|
|
||||||
git:
|
git:
|
||||||
image: websoft9dev/git:$APP_VERSION
|
image: websoft9dev/git:$GIT_VERSION
|
||||||
container_name: websoft9-git
|
container_name: websoft9-git
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
@ -49,7 +49,7 @@ services:
|
|||||||
com.docker.compose.w9_http.port: 3000
|
com.docker.compose.w9_http.port: 3000
|
||||||
|
|
||||||
proxy:
|
proxy:
|
||||||
image: jc21/nginx-proxy-manager:${APP_VERSION}
|
image: jc21/nginx-proxy-manager:$PROXY_VERSION
|
||||||
container_name: websoft9-proxy
|
container_name: websoft9-proxy
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
|
@ -4,14 +4,6 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
|
|||||||
# Export PATH
|
# Export PATH
|
||||||
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 vars
|
# Define vars
|
||||||
install_path="/data/websoft9"
|
install_path="/data/websoft9"
|
||||||
@ -21,24 +13,21 @@ if [[ "$1" == "dev" ]]; then
|
|||||||
urls="https://w9artifact.blob.core.windows.net/dev/websoft9"
|
urls="https://w9artifact.blob.core.windows.net/dev/websoft9"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Download and extract source code
|
|
||||||
wget $urls/websoft9.latest && unzip websoft9.latest $install_path
|
|
||||||
|
|
||||||
# Install runtime
|
# Install runtime
|
||||||
curl https://websoft9.github.io/websoft9/install/install_tools.sh | bash
|
bash install_tools.sh
|
||||||
curl https://websoft9.github.io/websoft9/install/install_docker.sh | bash
|
bash install_docker.sh
|
||||||
|
|
||||||
# Install Cockpit and plugins
|
# Install Cockpit and plugins
|
||||||
curl https://websoft9.github.io/websoft9/install/install_cockpit.sh | bash
|
bash install_cockpit.sh
|
||||||
curl https://websoft9.github.io/websoft9/install/install_plugins.sh | bash
|
bash install_plugins.sh
|
||||||
|
|
||||||
# Install backend service
|
# Install backend service
|
||||||
cd $install_path/docker
|
cd $install_path/docker
|
||||||
sudo docker network create websoft9
|
sudo docker network create websoft9
|
||||||
sudo docker-compose -p websoft9 up -d
|
sudo docker compose -p websoft9 up -d
|
||||||
|
|
||||||
# Install Systemd service
|
# Install Systemd service
|
||||||
cd $install_path/websoft9/systemd
|
cd $install_path/systemd
|
||||||
sudo systemctl daemon-reload
|
sudo systemctl daemon-reload
|
||||||
sudo systemctl enable websoft9.service
|
sudo systemctl enable websoft9.service
|
||||||
sudo systemctl start websoft9
|
sudo systemctl start websoft9
|
@ -1,3 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Define PATH
|
||||||
|
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
|
||||||
|
# Export PATH
|
||||||
|
export PATH
|
||||||
|
|
||||||
|
|
||||||
|
CheckEnvironment
|
||||||
|
InstallCockpit
|
||||||
|
|
||||||
|
|
||||||
function get_os_type() {
|
function get_os_type() {
|
||||||
if [ -f /etc/os-release ]; then
|
if [ -f /etc/os-release ]; then
|
||||||
. /etc/os-release
|
. /etc/os-release
|
||||||
|
Loading…
Reference in New Issue
Block a user