refactor: rename Gitea environment variables to CI registry prefix
update SETUP.md and .env.example
This commit is contained in:
1 parent
6b494a34fe
commit
3c2b29ad26
7 files changed
+31
-36
No files matched your search
+6
-9
@@ -31,10 +31,12 @@ ADMIN_SESSION_TTL_HOURS=12
|
|||||||
# VITE_PUBLIC_HLS_URL=http://localhost/hls/playlist.m3u8
|
# VITE_PUBLIC_HLS_URL=http://localhost/hls/playlist.m3u8
|
||||||
|
|
||||||
# Gitea Container Registry (for self-hosted Docker images)
|
# Gitea Container Registry (for self-hosted Docker images)
|
||||||
GITEA_REGISTRY_URL=git.allucanget.biz
|
CI_REGISTRY_URL=git.allucanget.biz
|
||||||
GITEA_USERNAME=your-gitea-username
|
CI_REGISTRY_USER=your-gitea-username
|
||||||
GITEA_TOKEN=your-gitea-token
|
CI_REGISTRY_TOKEN=your-gitea-token
|
||||||
GITEA_REGISTRY_NAMESPACE=zwitschi/linearvoid
|
CI_REGISTRY_NAMESPACE=zwitschi/linearvoid
|
||||||
|
# Gitea API access (optional, for CI/release automation)
|
||||||
|
CI_SERVER_URL=https://git.allucanget.biz
|
||||||
|
|
||||||
# Chat / Application Database (compose-safe PostgreSQL by default, SQLite optional)
|
# Chat / Application Database (compose-safe PostgreSQL by default, SQLite optional)
|
||||||
DATABASE_URL=postgres://linearvoid:linearvoid@db:5432/linearvoid?sslmode=disable
|
DATABASE_URL=postgres://linearvoid:linearvoid@db:5432/linearvoid?sslmode=disable
|
||||||
@@ -62,8 +64,3 @@ GRAFANA_PORT=3001
|
|||||||
# Development flags
|
# Development flags
|
||||||
NODE_ENV=development
|
NODE_ENV=development
|
||||||
GO_ENV=development
|
GO_ENV=development
|
||||||
|
|
||||||
# Gitea Configuration
|
|
||||||
GITEA_SERVER_URL=https://git.allucanget.biz
|
|
||||||
GITEA_TOKEN=your-gitea-token
|
|
||||||
GITEA_USERNAME=your-gitea-username
|
|
||||||
@@ -22,8 +22,8 @@ jobs:
|
|||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: git.allucanget.biz
|
registry: git.allucanget.biz
|
||||||
username: ${{ secrets.GITEA_USERNAME }}
|
username: ${{ secrets.CI_REGISTRY_USER }}
|
||||||
password: ${{ secrets.GITEA_TOKEN }}
|
password: ${{ secrets.CI_REGISTRY_TOKEN }}
|
||||||
|
|
||||||
- name: Pull latest images
|
- name: Pull latest images
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -63,8 +63,8 @@ jobs:
|
|||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: git.allucanget.biz
|
registry: git.allucanget.biz
|
||||||
username: ${{ secrets.GITEA_USERNAME }}
|
username: ${{ secrets.CI_REGISTRY_USER }}
|
||||||
password: ${{ secrets.GITEA_TOKEN }}
|
password: ${{ secrets.CI_REGISTRY_TOKEN }}
|
||||||
|
|
||||||
- name: Extract metadata for Playout
|
- name: Extract metadata for Playout
|
||||||
id: meta-playout
|
id: meta-playout
|
||||||
@@ -169,4 +169,4 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
generate_release_notes: true
|
generate_release_notes: true
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.CI_REGISTRY_TOKEN }}
|
||||||
@@ -13,7 +13,7 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
token: ${{ secrets.GITEA_TOKEN }}
|
token: ${{ secrets.CI_REGISTRY_TOKEN }}
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
@@ -42,7 +42,7 @@ jobs:
|
|||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@v5
|
uses: peter-evans/create-pull-request@v5
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITEA_TOKEN }}
|
token: ${{ secrets.CI_REGISTRY_TOKEN }}
|
||||||
commit-message: "chore: update dependencies"
|
commit-message: "chore: update dependencies"
|
||||||
title: "chore: weekly dependency updates"
|
title: "chore: weekly dependency updates"
|
||||||
body: |
|
body: |
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ jobs:
|
|||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: git.allucanget.biz
|
registry: git.allucanget.biz
|
||||||
username: ${{ secrets.GITEA_USERNAME }}
|
username: ${{ secrets.CI_REGISTRY_USER }}
|
||||||
password: ${{ secrets.GITEA_TOKEN }}
|
password: ${{ secrets.CI_REGISTRY_TOKEN }}
|
||||||
|
|
||||||
- name: Extract version
|
- name: Extract version
|
||||||
id: version
|
id: version
|
||||||
@@ -117,4 +117,4 @@ jobs:
|
|||||||
generate_release_notes: true
|
generate_release_notes: true
|
||||||
tag_name: ${{ steps.version.outputs.version }}
|
tag_name: ${{ steps.version.outputs.version }}
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.CI_REGISTRY_TOKEN }}
|
||||||
@@ -12,6 +12,7 @@ This guide covers prerequisites, environment setup, running the application loca
|
|||||||
- **Git**: For cloning and version control.
|
- **Git**: For cloning and version control.
|
||||||
- **Cloudflare Account**: For R2 storage and CDN (free tier sufficient for most use cases).
|
- **Cloudflare Account**: For R2 storage and CDN (free tier sufficient for most use cases).
|
||||||
- **Gitea Account**: Required if you want to push images to the self-hosted registry or use the repository's CI/CD flow.
|
- **Gitea Account**: Required if you want to push images to the self-hosted registry or use the repository's CI/CD flow.
|
||||||
|
- Create new secrets in Gitea: Settings → Secrets → Actions, add `CI_REGISTRY_USER` (username) and `CI_REGISTRY_TOKEN` (token with `write:packages` scope)
|
||||||
- **Hetzner Cloud Account** (optional for production): For the US-East VPS (Ashburn, VA recommended per ADR-001).
|
- **Hetzner Cloud Account** (optional for production): For the US-East VPS (Ashburn, VA recommended per ADR-001).
|
||||||
|
|
||||||
## Development Prerequisites
|
## Development Prerequisites
|
||||||
@@ -70,10 +71,12 @@ This guide covers prerequisites, environment setup, running the application loca
|
|||||||
# VITE_PUBLIC_HLS_URL=http://localhost/hls/playlist.m3u8
|
# VITE_PUBLIC_HLS_URL=http://localhost/hls/playlist.m3u8
|
||||||
|
|
||||||
# Gitea Container Registry (for self-hosted Docker images)
|
# Gitea Container Registry (for self-hosted Docker images)
|
||||||
GITEA_REGISTRY_URL=git.allucanget.biz
|
CI_REGISTRY_URL=git.allucanget.biz
|
||||||
GITEA_USERNAME=your-gitea-username
|
CI_REGISTRY_USER=your-gitea-username
|
||||||
GITEA_TOKEN=your-gitea-token
|
CI_REGISTRY_TOKEN=your-gitea-token
|
||||||
GITEA_REGISTRY_NAMESPACE=zwitschi/linearvoid
|
CI_REGISTRY_NAMESPACE=zwitschi/linearvoid
|
||||||
|
# Gitea API access (optional, for CI/release automation)
|
||||||
|
CI_SERVER_URL=https://git.allucanget.biz
|
||||||
|
|
||||||
# Chat / Database
|
# Chat / Database
|
||||||
DATABASE_URL=postgres://linearvoid:linearvoid@db:5432/linearvoid?sslmode=disable
|
DATABASE_URL=postgres://linearvoid:linearvoid@db:5432/linearvoid?sslmode=disable
|
||||||
@@ -99,11 +102,6 @@ This guide covers prerequisites, environment setup, running the application loca
|
|||||||
# Development flags
|
# Development flags
|
||||||
NODE_ENV=development
|
NODE_ENV=development
|
||||||
GO_ENV=development
|
GO_ENV=development
|
||||||
|
|
||||||
# Gitea API access (optional, for CI/release automation)
|
|
||||||
GITEA_SERVER_URL=https://git.allucanget.biz
|
|
||||||
GITEA_TOKEN=your-gitea-token
|
|
||||||
GITEA_USERNAME=your-gitea-username
|
|
||||||
```
|
```
|
||||||
|
|
||||||
4. **Check local value overrides for Docker Compose**:
|
4. **Check local value overrides for Docker Compose**:
|
||||||
@@ -162,12 +160,12 @@ This guide covers prerequisites, environment setup, running the application loca
|
|||||||
|
|
||||||
2. **Create an access token**:
|
2. **Create an access token**:
|
||||||
- Generate a token with the scopes needed for package/registry access and, if applicable, repository automation.
|
- Generate a token with the scopes needed for package/registry access and, if applicable, repository automation.
|
||||||
- Store it as `GITEA_TOKEN` in `.env`.
|
- Store it as `CI_REGISTRY_TOKEN` in `.env`.
|
||||||
|
|
||||||
3. **Configure registry variables**:
|
3. **Configure registry variables**:
|
||||||
- Set `GITEA_REGISTRY_URL` to the Gitea host.
|
- Set `CI_REGISTRY_URL` to the Gitea host.
|
||||||
- Set `GITEA_REGISTRY_NAMESPACE` to the image namespace, for example `zwitschi/linearvoid`.
|
- Set `CI_REGISTRY_NAMESPACE` to the image namespace, for example `zwitschi/linearvoid`.
|
||||||
- Set `GITEA_USERNAME` to the account that will push or pull images.
|
- Set `CI_REGISTRY_USER` to the account that will push or pull images.
|
||||||
|
|
||||||
4. **Authenticate Docker to the registry**:
|
4. **Authenticate Docker to the registry**:
|
||||||
|
|
||||||
@@ -260,7 +258,7 @@ This guide covers prerequisites, environment setup, running the application loca
|
|||||||
```
|
```
|
||||||
|
|
||||||
5. **Publish or verify required images in Gitea**:
|
5. **Publish or verify required images in Gitea**:
|
||||||
- Ensure the `playout`, `chat`, and `nginx` images exist under `${GITEA_REGISTRY_URL}/${GITEA_REGISTRY_NAMESPACE}`.
|
- Ensure the `playout`, `chat`, and `nginx` images exist under `${CI_REGISTRY_URL}/${CI_REGISTRY_NAMESPACE}`.
|
||||||
- Log in to the registry from the VPS before pulling.
|
- Log in to the registry from the VPS before pulling.
|
||||||
|
|
||||||
6. **Deploy the production stack**:
|
6. **Deploy the production stack**:
|
||||||
|
|||||||
+3
-3
@@ -1,6 +1,6 @@
|
|||||||
services:
|
services:
|
||||||
playout:
|
playout:
|
||||||
image: ${GITEA_REGISTRY_URL:-git.allucanget.biz}/${GITEA_REGISTRY_NAMESPACE:-zwitschi/linearvoid}/playout:latest
|
image: ${CI_REGISTRY_URL:-git.allucanget.biz}/${CI_REGISTRY_NAMESPACE:-zwitschi/linearvoid}/playout:latest
|
||||||
build:
|
build:
|
||||||
context: ./backend/playout
|
context: ./backend/playout
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
@@ -24,7 +24,7 @@ services:
|
|||||||
start_period: 10s
|
start_period: 10s
|
||||||
|
|
||||||
chat:
|
chat:
|
||||||
image: ${GITEA_REGISTRY_URL:-git.allucanget.biz}/${GITEA_REGISTRY_NAMESPACE:-zwitschi/linearvoid}/chat:latest
|
image: ${CI_REGISTRY_URL:-git.allucanget.biz}/${CI_REGISTRY_NAMESPACE:-zwitschi/linearvoid}/chat:latest
|
||||||
build:
|
build:
|
||||||
context: ./backend/chat
|
context: ./backend/chat
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
@@ -51,7 +51,7 @@ services:
|
|||||||
start_period: 10s
|
start_period: 10s
|
||||||
|
|
||||||
nginx:
|
nginx:
|
||||||
image: ${GITEA_REGISTRY_URL:-git.allucanget.biz}/${GITEA_REGISTRY_NAMESPACE:-zwitschi/linearvoid}/nginx:latest
|
image: ${CI_REGISTRY_URL:-git.allucanget.biz}/${CI_REGISTRY_NAMESPACE:-zwitschi/linearvoid}/nginx:latest
|
||||||
build:
|
build:
|
||||||
context: ./infrastructure/nginx
|
context: ./infrastructure/nginx
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
|||||||
Reference in new issue
Block a user