feat: add admin UI frontend and complete backend APIs
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
- Add Vue 3 frontend with Element Plus - Implement login, dashboard, tenant management - Add app configuration, logs viewer, stats pages - Add user management for admins - Update Drone CI to build and deploy frontend - Frontend ports: 3001 (test), 4001 (prod)
This commit is contained in:
23
.drone.yml
23
.drone.yml
@@ -10,6 +10,7 @@ trigger:
|
||||
- push
|
||||
|
||||
steps:
|
||||
# 构建后端镜像
|
||||
- name: build-backend
|
||||
image: docker:dind
|
||||
volumes:
|
||||
@@ -19,6 +20,17 @@ steps:
|
||||
- docker build -t platform-backend:${DRONE_COMMIT_SHA:0:8} -f deploy/Dockerfile.backend .
|
||||
- docker tag platform-backend:${DRONE_COMMIT_SHA:0:8} platform-backend:latest
|
||||
|
||||
# 构建前端镜像
|
||||
- name: build-frontend
|
||||
image: docker:dind
|
||||
volumes:
|
||||
- name: docker-sock
|
||||
path: /var/run/docker.sock
|
||||
commands:
|
||||
- docker build -t platform-frontend:${DRONE_COMMIT_SHA:0:8} -f deploy/Dockerfile.frontend .
|
||||
- docker tag platform-frontend:${DRONE_COMMIT_SHA:0:8} platform-frontend:latest
|
||||
|
||||
# 部署测试环境
|
||||
- name: deploy-test
|
||||
image: docker:dind
|
||||
volumes:
|
||||
@@ -34,13 +46,15 @@ steps:
|
||||
CONFIG_ENCRYPT_KEY:
|
||||
from_secret: config_encrypt_key
|
||||
commands:
|
||||
- docker stop platform-backend-test || true
|
||||
- docker rm platform-backend-test || true
|
||||
- docker stop platform-backend-test platform-frontend-test || true
|
||||
- docker rm platform-backend-test platform-frontend-test || true
|
||||
- docker run -d --name platform-backend-test -p 8001:8000 --restart unless-stopped -e DATABASE_URL=$DATABASE_URL -e API_KEY=$API_KEY -e JWT_SECRET=$JWT_SECRET -e CONFIG_ENCRYPT_KEY=$CONFIG_ENCRYPT_KEY platform-backend:latest
|
||||
- docker run -d --name platform-frontend-test -p 3001:80 --restart unless-stopped platform-frontend:latest
|
||||
when:
|
||||
branch:
|
||||
- develop
|
||||
|
||||
# 部署生产环境
|
||||
- name: deploy-prod
|
||||
image: docker:dind
|
||||
volumes:
|
||||
@@ -56,9 +70,10 @@ steps:
|
||||
CONFIG_ENCRYPT_KEY:
|
||||
from_secret: config_encrypt_key
|
||||
commands:
|
||||
- docker stop platform-backend-prod || true
|
||||
- docker rm platform-backend-prod || true
|
||||
- docker stop platform-backend-prod platform-frontend-prod || true
|
||||
- docker rm platform-backend-prod platform-frontend-prod || true
|
||||
- docker run -d --name platform-backend-prod -p 9001:8000 --restart unless-stopped -e DATABASE_URL=$DATABASE_URL -e API_KEY=$API_KEY -e JWT_SECRET=$JWT_SECRET -e CONFIG_ENCRYPT_KEY=$CONFIG_ENCRYPT_KEY platform-backend:latest
|
||||
- docker run -d --name platform-frontend-prod -p 4001:80 --restart unless-stopped platform-frontend:latest
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
|
||||
Reference in New Issue
Block a user