feat: add deploy pipeline and switch Dockerfile to COPY-based build
Some checks failed
continuous-integration/drone/push Build is failing

Add deploy_server Drone pipeline that builds and pushes the Docker image
to Gitea Container Registry, then deploys to VPS via SSH. Switch
Dockerfile from git clone to COPY-based build for CI compatibility and
better layer caching. Change exposed port to 3001.
This commit is contained in:
2026-02-24 17:52:48 +01:00
parent 93a0928928
commit e732305d99
3 changed files with 60 additions and 16 deletions

View File

@@ -27,3 +27,46 @@ steps:
commands:
- npm ci
- npm run check_format
---
kind: pipeline
type: docker
name: deploy_server
steps:
- name: upload_to_registry
image: plugins/docker
settings:
registry: gitea.gilmour109.de
repo: gitea.gilmour109.de/Gilmour109/calchat-server
dockerfile: apps/server/docker/Dockerfile
tags:
- latest
- main
username:
from_secret: gitea_username
password:
from_secret: gitea_password
- name: ssh
image: appleboy/drone-ssh
settings:
host:
- 10.0.0.1
username: root
password:
from_secret: vps_ssh_password
envs:
- gitea_username
- gitea_password
port: 22
command_timeout: 2m
script:
- docker login -u $GITEA_USERNAME -p $GITEA_PASSWORD gitea.gilmour109.de
- docker pull gitea.gilmour109.de/gilmour109/calchat-server:latest
- docker compose -f /root/calchat-mongo/docker-compose.yml up -d
depends_on:
- server_build_and_test
- check_for_formatting