You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.4 KiB
YAML

2 weeks ago
kind: pipeline
type: docker
name: venue_reservation_manage
steps:
- name: prepare
2 weeks ago
image: node:18-alpine
2 weeks ago
volumes:
- name: node-model
path: /app/model
- name: node-cache
path: /app/cache
- name: node-build
path: /app/build
commands:
2 weeks ago
- npm install -g pnpm
- pnpm config set store-dir /app/model
- pnpm config set registry https://registry.npmjs.org
# 检查是否存在 pnpm-lock.yaml不存在则生成
- |
if [ ! -f "pnpm-lock.yaml" ]; then
echo "pnpm-lock.yaml 不存在,正在生成..."
pnpm install --lockfile-only
fi
- pnpm install --frozen-lockfile
- pnpm run build
2 weeks ago
- cp -r dist /app/build/
- cp Dockerfile /app/build/
- cp default.conf /app/build/
- cp run.sh /app/build/
- name: build
image: plugins/docker
volumes:
- name: node-build
path: /app/build
- name: docker
path: /var/run/docker.sock
settings:
dockerfile: /app/build/Dockerfile
commands:
- cd /app/build
- chmod +x run.sh
- sh run.sh
- docker ps
volumes:
- name: node-build
host:
path: /home/docker/drone/node/build
- name: node-model
host:
path: /home/docker/drone/node/model
- name: node-cache
host:
path: /home/docker/drone/node/cache
- name: docker
host:
path: /var/run/docker.sock