Capture visible project changes
Hop-State: A_06FP5Z1HNEX21B2P87NTV2R Hop-Captured-From: A_06FP5KEDBTB4A9ZT7QB498G
This commit is contained in:
@@ -1,47 +0,0 @@
|
|||||||
name: CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
smoke:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
cache: npm
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Type check
|
|
||||||
run: npm run type-check
|
|
||||||
|
|
||||||
- name: Targeted bot regression checks
|
|
||||||
run: >
|
|
||||||
AUTH_SECRET=ci-test-secret
|
|
||||||
npx vitest run
|
|
||||||
src/lib/bots/encryption.test.ts
|
|
||||||
src/lib/bots/contentSource.test.ts
|
|
||||||
src/lib/bots/posting.property.test.ts
|
|
||||||
src/lib/bots/mentionHandler.property.test.ts
|
|
||||||
src/lib/bots/scheduler.test.ts
|
|
||||||
|
|
||||||
- name: Embedded database smoke test
|
|
||||||
run: DATABASE_PATH=/tmp/synapsis-ci.db npm run db:migrate
|
|
||||||
|
|
||||||
- name: Production build
|
|
||||||
run: npm run build
|
|
||||||
env:
|
|
||||||
AUTH_SECRET: ci-test-secret
|
|
||||||
DATABASE_PATH: /tmp/synapsis-ci.db
|
|
||||||
NEXT_PUBLIC_NODE_DOMAIN: localhost:43821
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
# Working on Synapsis
|
|
||||||
|
|
||||||
Synapsis uses an embedded Turso database and runs as a native Node.js process. Docker and a local PostgreSQL server are not part of the development or deployment workflow.
|
|
||||||
|
|
||||||
## Local loop
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm install
|
|
||||||
cp .env.example .env
|
|
||||||
npm run db:migrate
|
|
||||||
npm run dev
|
|
||||||
```
|
|
||||||
|
|
||||||
Before handing off a change:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm run type-check
|
|
||||||
npm test
|
|
||||||
npm run build
|
|
||||||
```
|
|
||||||
|
|
||||||
When the schema changes, edit `src/db/schema.ts`, generate a migration with `npm run db:generate`, and verify it against a fresh database:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
DATABASE_PATH=/tmp/synapsis-test.db npm run db:migrate
|
|
||||||
```
|
|
||||||
|
|
||||||
## VPS workflow
|
|
||||||
|
|
||||||
Production runs through `synapsis.service`, listening on `127.0.0.1:43821`. Reverse-proxy configuration belongs to the host operator.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
sudo /opt/synapsis/deploy/update.sh
|
|
||||||
sudo systemctl status synapsis
|
|
||||||
sudo journalctl -u synapsis -f
|
|
||||||
```
|
|
||||||
|
|
||||||
The updater makes a timestamped database backup, pulls with `--ff-only`, installs dependencies, runs migrations, builds, and restarts the service.
|
|
||||||
@@ -52,7 +52,7 @@ Supported S3-compatible providers include AWS S3, Cloudflare R2, Backblaze B2, W
|
|||||||
## Development
|
## Development
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/GnosysLabs/Synapsis.git
|
git clone https://githop.xyz/GnosysLabs/Synapsis.git
|
||||||
cd Synapsis
|
cd Synapsis
|
||||||
npm install
|
npm install
|
||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ set -euo pipefail
|
|||||||
APP_DIR="${APP_DIR:-/opt/synapsis}"
|
APP_DIR="${APP_DIR:-/opt/synapsis}"
|
||||||
DATA_DIR="${DATA_DIR:-/var/lib/synapsis}"
|
DATA_DIR="${DATA_DIR:-/var/lib/synapsis}"
|
||||||
ENV_FILE="${ENV_FILE:-/etc/synapsis.env}"
|
ENV_FILE="${ENV_FILE:-/etc/synapsis.env}"
|
||||||
REPO_URL="${REPO_URL:-https://github.com/GnosysLabs/Synapsis.git}"
|
REPO_URL="${REPO_URL:-https://githop.xyz/GnosysLabs/Synapsis.git}"
|
||||||
BRANCH="${BRANCH:-main}"
|
BRANCH="${BRANCH:-main}"
|
||||||
|
|
||||||
if [[ ${EUID} -ne 0 ]]; then
|
if [[ ${EUID} -ne 0 ]]; then
|
||||||
|
|||||||
@@ -591,7 +591,6 @@ export default function AdminPage() {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user