Multi-tenant platform: per-streamer overlay/sender links + CI/CD
Some checks failed
CI/CD Pipeline / build-and-deploy (push) Failing after 2s
Some checks failed
CI/CD Pipeline / build-and-deploy (push) Failing after 2s
Streamers log in with Google on a new landing page and get a dashboard with two auto-generated, permanent links: one for their OBS/StreamLabs Browser Source, one to share with viewers. Messages are now scoped to the right streamer via Socket.IO rooms instead of broadcasting globally. Streamer records and tokens are persisted in SQLite (node:sqlite) so links survive restarts/redeploys. Also adds a Forgejo Actions pipeline mirroring t2sTelegramBot's: build, smoke-test, push to the local registry, then deploy to the prod host over SSH. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
7882db1f37
commit
9c91966730
14 changed files with 444 additions and 34 deletions
49
.forgejo/workflows/deploy.yml
Normal file
49
.forgejo/workflows/deploy.yml
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
name: CI/CD Pipeline
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: shell
|
||||
steps:
|
||||
- name: Clone repository
|
||||
run: git clone --depth 1 "http://192.168.8.174:3000/${GITHUB_REPOSITORY}.git" .
|
||||
env:
|
||||
GIT_TERMINAL_PROMPT: '0'
|
||||
|
||||
- name: Ensure Docker CLI
|
||||
run: |
|
||||
apk add --no-cache docker-cli docker-cli-compose openssh-client || true
|
||||
grep -q '^vrubel:' /etc/passwd || echo 'vrubel:x:1000:1000::/data:/bin/sh' >> /etc/passwd
|
||||
|
||||
- name: Setup .env for CI/CD
|
||||
run: cp .env.example .env
|
||||
|
||||
- name: Build Docker image
|
||||
run: docker-compose build
|
||||
|
||||
- name: Start container for test
|
||||
run: docker-compose up -d
|
||||
|
||||
- name: Verify service running
|
||||
run: |
|
||||
sleep 5
|
||||
docker-compose logs --tail=20
|
||||
|
||||
- name: Stop container
|
||||
run: docker-compose down
|
||||
|
||||
- name: Login to Gitea Container Registry
|
||||
run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login http://192.168.8.174:3000 -u "${{ secrets.REGISTRY_USER }}" --password-stdin
|
||||
|
||||
- name: Push image to registry
|
||||
run: docker push 192.168.8.174:3000/vrubel/send2streamer:latest
|
||||
|
||||
- name: Copy docker-compose to prod host
|
||||
run: cat docker-compose.prod.yml | ssh -i /data/.ssh/id_ed25519 -o StrictHostKeyChecking=no vrubel@192.168.8.171 "mkdir -p ~/services/sendMessageToStreamer && cat > ~/services/sendMessageToStreamer/docker-compose.yml"
|
||||
|
||||
- name: Deploy on prod host
|
||||
run: ssh -i /data/.ssh/id_ed25519 -o StrictHostKeyChecking=no vrubel@192.168.8.171 "cd ~/services/sendMessageToStreamer && docker pull 192.168.8.174:3000/vrubel/send2streamer:latest && docker compose up -d --remove-orphans"
|
||||
Loading…
Add table
Add a link
Reference in a new issue