This commit is contained in:
commit
16e8616d07
12
.drone.yml
Normal file
12
.drone.yml
Normal 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
8
control.sh
Normal 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
26
deploy.sh
Normal 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
21
docker-compose.yml
Normal 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
|
||||
Loading…
Reference in New Issue
Block a user