Replace Dockerfiles, Compose and Drone CI with clean working setup
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
2026-03-18 20:02:20 +06:00
parent 7388962a7d
commit 389b92f68a
7 changed files with 108 additions and 400 deletions

View File

@@ -1,18 +1,16 @@
kind: pipeline
kind: pipeline
type: docker
name: code-quality
name: checks
trigger:
event:
- push
- pull_request
steps:
- name: backend-sanity
- name: backend-syntax
image: python:3.11-slim
commands:
- cd backend
- pip install --no-cache-dir -r requirements.txt
- python -m py_compile main.py auth.py daemons.py oidc_config.py
- name: frontend-build-check
@@ -21,14 +19,6 @@ steps:
- cd frontend
- npm ci --silent
- npm run build
- npm run lint || echo "ESLint warnings found"
- name: frontend-security
image: node:20-alpine
commands:
- cd frontend
- npm ci --silent
- npm audit --audit-level=moderate || echo "Security warnings found"
---
kind: pipeline
@@ -36,31 +26,24 @@ type: docker
name: build-images
trigger:
branch:
- main
- master
- develop
event:
- push
- tag
depends_on:
- code-quality
steps:
- name: build-backend-image
image: plugins/docker
settings:
registry: registry.nevetime.ru
repo: registry.nevetime.ru/mc-panel-backend
context: backend
dockerfile: Dockerfile
tags:
- latest
- "${DRONE_BUILD_NUMBER}"
- "${DRONE_COMMIT_SHA:0:8}"
- "${DRONE_BRANCH}"
- ${DRONE_BUILD_NUMBER}
auto_tag: true
dockerfile: backend/Dockerfile
context: backend
cache_from:
- registry.nevetime.ru/mc-panel-backend:latest
username:
from_secret: docker_username
password:
@@ -71,66 +54,15 @@ steps:
settings:
registry: registry.nevetime.ru
repo: registry.nevetime.ru/mc-panel-frontend
tags:
- latest
- "${DRONE_BUILD_NUMBER}"
- "${DRONE_COMMIT_SHA:0:8}"
- "${DRONE_BRANCH}"
auto_tag: true
dockerfile: frontend/Dockerfile
context: frontend
username:
from_secret: docker_username
password:
from_secret: docker_password
build_args:
- BUILD_DATE=${DRONE_BUILD_CREATED}
- VCS_REF=${DRONE_COMMIT_SHA}
- VERSION=${DRONE_TAG:-${DRONE_BRANCH}}
when:
event:
- push
- tag
---
kind: pipeline
type: docker
name: build-monolith
trigger:
branch:
- main
- master
- develop
event:
- push
- tag
depends_on:
- code-quality
steps:
- name: build-monolith-image
image: plugins/docker
settings:
registry: registry.nevetime.ru
repo: registry.nevetime.ru/mc-panel
dockerfile: Dockerfile
tags:
- latest
- "${DRONE_COMMIT_SHA:0:8}"
- "${DRONE_BRANCH}"
- ${DRONE_BUILD_NUMBER}
auto_tag: true
dockerfile: Dockerfile
context: .
cache_from:
- registry.nevetime.ru/mc-panel-frontend:latest
username:
from_secret: docker_username
password:
from_secret: docker_password
build_args:
- BUILD_DATE=${DRONE_BUILD_CREATED}
- VCS_REF=${DRONE_COMMIT_SHA}
- VERSION=${DRONE_TAG:-${DRONE_BRANCH}}
when:
event:
- push
- tag