If you are a developer and want to customize the installation configuration, please read the installation steps below, otherwise it is recommended to use the graphical deployment installation method.
# Download shell script
wget https://raw.githubusercontent.com/fanglu0411/sgs/main/script/deploy.sh deploy-sgs.sh
# or use curl
curl -fsSL https://raw.githubusercontent.com/fanglu0411/sgs/main/script/deploy.sh -o deploy-sgs.sh
# Change permission
chmod 777 deploy-sgs.sh
# Run install command
./deploy-sgs.sh DB_PORT=33061 API_PORT=6102 WEB_PORT=5080
sgs-mysql
sgs database imagesgs-api
sgs api imagesgs-web
optional for web app
sudo docker pull lufang0411/sgs-mysql:latest &&
sudo docker pull lufang0411/sgs-api:latest &&
sudo docker pull leeoluo/sgs-web:latest
If the official docker hub is not available for you, pleas run command below.
sudo docker pull crpi-d7tubu0e345ls62u.cn-chengdu.personal.cr.aliyuncs.com/lufang0411/sgs-mysql:latest &&
sudo docker pull crpi-d7tubu0e345ls62u.cn-chengdu.personal.cr.aliyuncs.com/lufang0411/sgs-api:latest &&
sudo docker pull crpi-d7tubu0e345ls62u.cn-chengdu.personal.cr.aliyuncs.com/leeoluo/sgs-web:latest
sgs_path=/data/docker/vol/sgs
mkdir -r ${sgs_path} && cd ${sgs_path}
mkdir sgs && mkdir api
sudo chmod 777 sgs && sudo chmod 777 api
DB_PORT=33061
API_PORT=6102
WEB_PORT=5080
docker run --privileged -d \
--restart=always \
-v "${sgs_path}/mysql:/var/lib/mysql" \
--name sgs-mysql \
-p ${DB_PORT}:3306 \
-e MYSQL_ROOT_PASSWORD=${MYSQL_PASSWORD} \
lufang0411/sgs-mysql:latest
docker run -dit \
--restart=always \
--name sgs-api \
-v "${sgs_path}/api:/home/sgs/data" \
-p ${API_PORT}:6102 \
-p 6122:22 \
--link sgs-mysql \
lufang0411/sgs-api:latest
docker run -d \
--restart=always \
--name sgs-web \
-p ${WEB_PORT}:80 \
--link sgs-api \
-e API_URL=sgs-api:${API_PORT} \
leeoluo/sgs-web:latest