Based on https://gist.github.com/PaulMColeman/e7ef82e05035b24300d2ea1954527f10 Changes: - Add ca-certificates for rustup HTTPS downloads - Install Rust and WASM toolchain for frontend WebAssembly compilation - Copy config directory needed for FLUXER_CONFIG env var - Set FLUXER_CONFIG so rspack can derive API endpoints - Update ENTRYPOINT to target @fluxer/server package specifically - Fix .dockerignore to allow build scripts and locale files These fixes address the most critical build issues documented in the community guide for self-hosting Fluxer.
112 lines
3.7 KiB
Markdown
112 lines
3.7 KiB
Markdown
# uwu.lc Self-Hosting Notes
|
|
|
|
## Branch Setup
|
|
|
|
**Current branch**: `uwu` (based on `refactor`)
|
|
- **Tracks**: `origin/refactor` for rebasing upstream changes
|
|
- **Pushes to**: `i5/uwu` on your Gitea instance at git.i5.wtf
|
|
- **Current state**: 1 commit ahead (LFS config change)
|
|
|
|
## Workflow
|
|
|
|
### Pull upstream changes and rebase
|
|
```bash
|
|
git fetch origin
|
|
git rebase origin/refactor
|
|
```
|
|
|
|
### Push your changes to Gitea
|
|
```bash
|
|
git push i5 uwu
|
|
# If you've rebased, use: git push i5 uwu --force-with-lease
|
|
```
|
|
|
|
### View your changes
|
|
```bash
|
|
git log origin/refactor..uwu # Show commits you've added
|
|
```
|
|
|
|
## Why track `refactor` branch?
|
|
|
|
The `refactor` branch is a complete rewrite that:
|
|
- Is simpler and lighter to self-host
|
|
- Uses SQLite instead of complex database setup
|
|
- Removes payment/Plutonium stuff for self-hosted deployments
|
|
- Is much better documented
|
|
- Is where active development happens
|
|
|
|
The old `main`/`canary` branches have the legacy stack that's harder to self-host.
|
|
|
|
## Configuration Changes Made
|
|
|
|
1. **LFS Config** (`.lfsconfig`): Updated to point to Gitea instance
|
|
- Old: `https://github.com/fluxerapp-old/fluxer-private.git/info/lfs`
|
|
- New: `https://git.i5.wtf/fluxerapp/fluxer.git/info/lfs`
|
|
|
|
2. **CI Workflows**: Updated for Gitea compatibility
|
|
- Changed all runners from `blacksmith-8vcpu-ubuntu-2404` to `ubuntu-latest`
|
|
- `ci.yaml`: Main CI workflow (typecheck, test, gateway, knip, ci-scripts)
|
|
- `release-server.yaml`: Docker build workflow
|
|
- Registry: `ghcr.io` → `git.i5.wtf`
|
|
- Image: `fluxerapp/fluxer-server`
|
|
- Trigger branch: `canary` → `uwu`
|
|
- Default source ref: `canary` → `uwu`
|
|
|
|
## Gitea Setup Requirements
|
|
|
|
### Container Registry Authentication
|
|
|
|
The workflow tries to use `secrets.GITEA_TOKEN` or `github.token` for registry auth.
|
|
|
|
**Required**: Create a Gitea Personal Access Token:
|
|
1. Go to Gitea Settings → Applications → Generate New Token
|
|
2. Name: `CI_Container_Registry`
|
|
3. Permissions: Select `package` (write access)
|
|
4. Add to repository secrets as `registry_token` (Note: Can't use GITEA_ or GITHUB_ prefix)
|
|
|
|
**Alternative**: Update the workflow to use username/password:
|
|
- Create a secret `REGISTRY_USERNAME` with your Gitea username
|
|
- Create a secret `REGISTRY_PASSWORD` with a personal access token
|
|
|
|
### Container Registry URL Format
|
|
|
|
Gitea registry format is typically:
|
|
- `git.i5.wtf/fluxerapp/fluxer-server:tag`
|
|
|
|
If the registry requires a different format, check your Gitea container registry settings.
|
|
|
|
## TODO
|
|
|
|
- [x] Modify GitHub Actions workflows for Gitea compatibility
|
|
- [ ] Fix container registry authentication
|
|
- [ ] Apply patches from third-party guide (if needed)
|
|
- [ ] Configure for uwu.lc domain
|
|
- [ ] Test CI on Gitea instance
|
|
- [ ] Build Docker image
|
|
- [ ] Deploy to production
|
|
|
|
## Resources
|
|
|
|
- **Third-party self-hosting guide**: https://gist.github.com/PaulMColeman/e7ef82e05035b24300d2ea1954527f10
|
|
- Documents 20 gotchas and fixes for building/deploying Fluxer
|
|
- Critical for successful Docker build
|
|
- Domain: uwu.lc
|
|
- Gitea: git.i5.wtf
|
|
|
|
## Known Build Issues from Third-Party Guide
|
|
|
|
The guide documents these critical Dockerfile fixes needed:
|
|
1. ✅ Fix package path (app → app_proxy)
|
|
2. ✅ Add Rust/WASM toolchain (frontend needs WebAssembly)
|
|
3. ✅ Add ca-certificates (for rustup HTTPS download)
|
|
4. ✅ Fix .dockerignore (unblock build scripts and locale files)
|
|
5. ✅ Set FLUXER_CONFIG env var (rspack needs this)
|
|
6. ✅ Copy config directory for build process
|
|
7. ✅ Update ENTRYPOINT to target fluxer_server package
|
|
|
|
Additional fixes that may be needed (will address if they come up):
|
|
- Empty CDN endpoint handling (frontend code)
|
|
- Content Security Policy adjustments
|
|
- NATS configuration
|
|
- LiveKit webhook configuration
|