mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-22 22:36:06 +08:00
修改镜像打包流程
This commit is contained in:
parent
2a1adb2e0e
commit
2fe8c38293
3
.github/workflows/docker.yml
vendored
3
.github/workflows/docker.yml
vendored
|
@ -46,7 +46,6 @@ jobs:
|
|||
- name: Docker buildx image and push on release
|
||||
env:
|
||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
if: startsWith(github.ref, 'refs/heads/')
|
||||
if: startsWith(github.ref, 'refs/heads/') && github.ref != 'refs/heads/master'
|
||||
run: |
|
||||
docker buildx build --build-arg SSH_PRIVATE_KEY="${SSH_PRIVATE_KEY}" --output "type=image,push=true" --platform=linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x --tag whyour/qinglong:${{steps.version.outputs.result}} docker/
|
||||
docker buildx build --build-arg SSH_PRIVATE_KEY="${SSH_PRIVATE_KEY}" --output "type=image,push=true" --platform=linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x --tag whyour/qinglong:latest docker/
|
||||
|
|
|
@ -19,7 +19,7 @@ export default class EnvService {
|
|||
public async create(payload: Env): Promise<Env> {
|
||||
const envs = await this.envs();
|
||||
let position = initEnvPosition;
|
||||
if (envs && envs.length > 0) {
|
||||
if (envs && envs.length > 0 && envs[envs.length - 1].position) {
|
||||
position = envs[envs.length - 1].position;
|
||||
}
|
||||
const tab = new Env({ ...payload, position: position / 2 });
|
||||
|
|
|
@ -37,6 +37,11 @@ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
|||
&& cp -f .env.example .env \
|
||||
&& chmod 777 ${QL_DIR}/shell/*.sh \
|
||||
&& chmod 777 ${QL_DIR}/docker/*.sh \
|
||||
&& yarn install \
|
||||
&& yarn build \
|
||||
&& yarn build-back \
|
||||
&& yarn cache clean \
|
||||
&& rm -rf node_modules \
|
||||
&& npm install -g pm2 \
|
||||
&& npm install -g pnpm \
|
||||
&& rm -rf /root/.npm \
|
||||
|
|
|
@ -7,18 +7,14 @@ link_shell
|
|||
echo -e "======================1. 检测配置文件========================\n"
|
||||
fix_config
|
||||
cp -fv $dir_root/docker/front.conf /etc/nginx/conf.d/front.conf
|
||||
echo
|
||||
|
||||
echo -e "======================2. 更新源代码========================\n"
|
||||
ql update "no-restart"
|
||||
pm2 l >/dev/null 2>&1
|
||||
echo
|
||||
|
||||
echo -e "======================3. 启动nginx========================\n"
|
||||
echo -e "======================2. 启动nginx========================\n"
|
||||
nginx -s reload 2>/dev/null || nginx -c /etc/nginx/nginx.conf
|
||||
echo -e "nginx启动成功...\n"
|
||||
|
||||
echo -e "======================4. 启动控制面板========================\n"
|
||||
echo -e "======================3. 启动控制面板========================\n"
|
||||
if [[ $(pm2 info panel 2>/dev/null) ]]; then
|
||||
pm2 reload panel --source-map-support --time
|
||||
else
|
||||
|
@ -26,7 +22,7 @@ else
|
|||
fi
|
||||
echo -e "控制面板启动成功...\n"
|
||||
|
||||
echo -e "======================5. 启动定时任务========================\n"
|
||||
echo -e "======================4. 启动定时任务========================\n"
|
||||
if [[ $(pm2 info schedule 2>/dev/null) ]]; then
|
||||
pm2 reload schedule --source-map-support --time
|
||||
else
|
||||
|
@ -35,10 +31,15 @@ fi
|
|||
echo -e "定时任务启动成功...\n"
|
||||
|
||||
if [[ $AutoStartBot == true ]]; then
|
||||
echo -e "======================6. 启动bot========================\n"
|
||||
echo -e "======================5. 启动bot========================\n"
|
||||
ql bot
|
||||
fi
|
||||
|
||||
if [[ $EnableExtraShell == true ]]; then
|
||||
echo -e "======================6. 执行自定义脚本========================\n"
|
||||
ql extra
|
||||
fi
|
||||
|
||||
echo -e "############################################################\n"
|
||||
echo -e "容器启动成功..."
|
||||
echo -e "\n请先访问5700端口,登录成功面板之后再执行添加定时任务..."
|
||||
|
|
Loading…
Reference in New Issue
Block a user