ci: Added gitea workflow

This commit is contained in:
2026-06-25 13:15:36 +05:30
parent e264f9f238
commit 849c2d15ed
2 changed files with 34 additions and 1 deletions

View File

@@ -0,0 +1,33 @@
name: Deployment Pipeline
on:
push:
branches:
- main
jobs:
deploy:
runs-on: production
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Build Docker Image
run: docker build -t bootstrap-auth-server:latest .
- name: Stop and Remove Existing Container
run: |
docker stop auth-server || true
docker rm auth-server || true
- name: Run New Container
run: |
# We map a local volume /opt/bootstrap-auth-server/data to persist the SQLite DB across deployments
docker run -d \
--name auth-server \
--restart unless-stopped \
-p 3000:3000 \
-e SERVER_PORT=3000 \
-v /opt/bootstrap-auth-server/data:/app/data \
-e DATABASE_URL="sqlite:///app/data/data.db?mode=rwc" \
bootstrap-auth-server:latest

View File

@@ -1,5 +1,5 @@
# Build stage
FROM rust:1.80-slim as builder
FROM rust:slim as builder
WORKDIR /usr/src/app