增加wikijs的部署
Some checks failed
continuous-integration/drone Build is failing

This commit is contained in:
yangzuhao 2023-02-12 14:32:20 +08:00
commit 16e8616d07
4 changed files with 67 additions and 0 deletions

12
.drone.yml Normal file
View File

@ -0,0 +1,12 @@
kind: pipeline
type: exec
name: FrpServ
steps:
- name: build
commands:
- sh deploy.sh
- name: start
commands:
- sh control.sh

8
control.sh Normal file
View File

@ -0,0 +1,8 @@
#!/bin/bash
EXEC_USER=work
su - ${EXEC_USER}
DEPLOY_PATH="/home/work/apps/wiki"
cd ${DEPLOY_PATH}
docker-compose up -d

26
deploy.sh Normal file
View File

@ -0,0 +1,26 @@
#!/bin/bash
EXEC_USER=work
su - ${EXEC_USER}
DEPLOY_PATH="/home/work/apps/wiki"
LOG_PATH="${DEPLOY_PATH}/log"
folder_exists() {
if [ -d "$1" ]; then
echo "folder is exists${1}"
return 0
fi
echo "create folder ${1}"
mkdir -p ${1}
chown -R work:work ${1}
}
pack_frp() {
cp -rv bin/ conf/ ${1}
}
folder_exists ${DEPLOY_PATH}
folder_exists ${LOG_PATH}
pack_frp ${DEPLOY_PATH}

21
docker-compose.yml Normal file
View File

@ -0,0 +1,21 @@
version: 2
services:
docker-ui:
hostname: wiki.flyaha.top
image: requarks/wiki:latest
container_name: wiki
ports:
- "8002:3000"
environment:
- DB_TYPE=mysql
- DB_HOST=192.168.123.245
- DB_PORT=4000
- DB_USER=www_git
- DB_PASS=Z2l0Cg==
- DB_NAME=work_wiki
volumes:
- /home/work/apps/wiki/data:/wiki/data/
networks:
default:
external:
name: flyaha