Align self-host docs with payment-free OSS Docker image.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
7d22f722f6
commit
26c4b22fbb
@@ -4,42 +4,61 @@ sidebar_position: 2
|
||||
|
||||
# Getting started
|
||||
|
||||
Run Songs2VID locally for development or self-hosting.
|
||||
Run Songs2VID locally for development or self-hosting. The OSS edition is payment-free and always has full entitlements (no Stripe, credits, or plans).
|
||||
|
||||
## 1. Environment file
|
||||
Source: [Gitea — Songs2VID/songs2vid](https://git.atakanozban.com/Songs2VID/songs2vid) (`main`).
|
||||
Image: [`atakanozban/songs2vid:latest`](https://hub.docker.com/r/atakanozban/songs2vid).
|
||||
|
||||
Copy the template, then edit **only** `.env` with your real values:
|
||||
## Fastest path: Docker Compose
|
||||
|
||||
1. Copy the template, then edit **only** `.env`:
|
||||
|
||||
```bash
|
||||
cp .env.example .env
|
||||
```
|
||||
|
||||
See [Environment variables](./environment.md) for required vs optional keys.
|
||||
Set `NEXTAUTH_SECRET`, `GOOGLE_CLIENT_ID`, and `GOOGLE_CLIENT_SECRET`. See [Environment variables](./environment.md).
|
||||
|
||||
## 2. PostgreSQL and Redis
|
||||
|
||||
For local app development (infra only):
|
||||
|
||||
```bash
|
||||
docker compose -f docker-compose.dev.yml up -d
|
||||
```
|
||||
|
||||
Or run the full stack (web + worker + DB) with the self-hosted edition — an optional Compose example:
|
||||
2. Configure Google OAuth (below), then start the full stack:
|
||||
|
||||
```bash
|
||||
docker compose up -d --build
|
||||
```
|
||||
|
||||
Compose is not required; any Postgres + Redis that match your `.env` works. See [Docker Compose](https://docs.docker.com/compose/) if you use the examples above.
|
||||
Or pull the published image:
|
||||
|
||||
## 3. Install and migrate
|
||||
```bash
|
||||
docker pull atakanozban/songs2vid:latest
|
||||
```
|
||||
|
||||
Open [http://localhost:3000](http://localhost:3000), sign in with Google, and use the dashboard.
|
||||
|
||||
Compose is not required; any Postgres + Redis that match your `.env` works. See [Docker Compose](https://docs.docker.com/compose/).
|
||||
|
||||
## Local development (app + worker)
|
||||
|
||||
### 1. Environment file
|
||||
|
||||
```bash
|
||||
cp .env.example .env
|
||||
```
|
||||
|
||||
### 2. PostgreSQL and Redis
|
||||
|
||||
```bash
|
||||
docker compose -f docker-compose.dev.yml up -d
|
||||
```
|
||||
|
||||
### 3. Install and migrate
|
||||
|
||||
```bash
|
||||
npm install
|
||||
npm run db:push
|
||||
npm run db:migrate
|
||||
```
|
||||
|
||||
## 4. Google OAuth
|
||||
(`npm run db:push` is an alternative if you prefer schema push without migrations.)
|
||||
|
||||
### 4. Google OAuth
|
||||
|
||||
In [Google Cloud Console](https://console.cloud.google.com/) (server-side only — end users never enter credentials):
|
||||
|
||||
@@ -52,21 +71,13 @@ In [Google Cloud Console](https://console.cloud.google.com/) (server-side only
|
||||
|
||||
Also set `NEXTAUTH_URL` to the same origin users open in the browser.
|
||||
|
||||
## 5. FFmpeg and fonts
|
||||
### 5. FFmpeg and fonts
|
||||
|
||||
The worker needs FFmpeg. The `ffmpeg-static` npm package is used by default. Set `FFMPEG_PATH` only if you want a system binary instead.
|
||||
The worker needs FFmpeg. The Docker image includes system FFmpeg; locally, `ffmpeg-static` is used by default. Set `FFMPEG_PATH` only if you want a system binary instead.
|
||||
|
||||
For curated watermark fonts (Inter, Montserrat, etc.), ensure files exist under `assets/fonts`:
|
||||
For curated watermark fonts (Inter, Montserrat, etc.), ensure files exist under `assets/fonts` (see `assets/fonts/README.md` in the repo). Custom `.ttf` / `.otf` uploads work without that step. See [Video editing](./video-editing.md).
|
||||
|
||||
```bash
|
||||
node scripts/fetch-watermark-fonts.mjs
|
||||
```
|
||||
|
||||
Custom `.ttf` / `.otf` uploads work without this step. See [Video editing](./video-editing.md).
|
||||
|
||||
## 6. Start app, worker, and docs
|
||||
|
||||
One command for everything:
|
||||
### 6. Start app and worker
|
||||
|
||||
```bash
|
||||
npm run dev:all
|
||||
@@ -76,32 +87,39 @@ npm run dev:all
|
||||
|---------|------------|
|
||||
| Next.js app | [http://localhost:3000](http://localhost:3000) |
|
||||
| BullMQ worker | Encodes videos and uploads to YouTube |
|
||||
| Docusaurus docs | [http://localhost:3001](http://localhost:3001) |
|
||||
|
||||
Or run them separately:
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
npm run worker
|
||||
npm run docs:dev
|
||||
```
|
||||
|
||||
## Authentication
|
||||
This docs site (Docusaurus) is maintained separately and published at [docs.songs2vid.com](https://docs.songs2vid.com).
|
||||
|
||||
Users sign in with Google via OAuth 2.0. The app connects their YouTube channel automatically — end users do not need Google Cloud credentials or API keys.
|
||||
## Authentication and settings
|
||||
|
||||
Users sign in with Google via OAuth 2.0. The app connects their YouTube channel automatically — end users do not need Google Cloud credentials.
|
||||
|
||||
After sign-in you go straight to the dashboard. **Settings** includes:
|
||||
|
||||
- Account
|
||||
- YouTube connection
|
||||
- API key
|
||||
|
||||
There is no billing, pricing, or credit UI in the self-hosted OSS build.
|
||||
|
||||
## Production
|
||||
|
||||
For public HTTPS, OAuth redirect URIs, and worker checklist, see [Production notes](./deploy.md). Repo Compose/Caddy files there are optional examples only.
|
||||
For public HTTPS, OAuth redirect URIs, and worker checklist, see [Production notes](./deploy.md).
|
||||
|
||||
## Useful scripts
|
||||
|
||||
| Script | Purpose |
|
||||
|--------|---------|
|
||||
| `npm run dev:all` | App (3000) + worker + docs (3001) together |
|
||||
| `npm run dev:all` | App (3000) + worker together |
|
||||
| `npm run dev` | Next.js dev server only |
|
||||
| `npm run worker` | Background job processor only |
|
||||
| `npm run docs:dev` | Documentation site only (port 3001) |
|
||||
| `npm run docs:build` | Static docs build (for Caddy / nginx) |
|
||||
| `npm run db:migrate` | Apply Prisma migrations |
|
||||
| `npm run db:push` | Push Prisma schema to the database |
|
||||
| `npm run build` | Production build |
|
||||
|
||||
Reference in New Issue
Block a user