diff --git a/NIX.md b/NIX.md index 4026f2d..2c4e2ed 100644 --- a/NIX.md +++ b/NIX.md @@ -24,7 +24,7 @@ Secrets auto-generate, database auto-initializes, and the web UI starts at http: nix run --extra-experimental-features 'nix-command flakes' github:RayLabsHQ/gitea-mirror # Pin to specific version -nix run github:RayLabsHQ/gitea-mirror/v3.8.11 +nix run github:RayLabsHQ/gitea-mirror/vX.Y.Z ``` ### 2. Install to Profile diff --git a/README.md b/README.md index af2d72a..ea2d0b4 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,7 @@ docker compose up -d #### Using Pre-built Image Directly ```bash -docker pull ghcr.io/raylabshq/gitea-mirror:v3.1.1 +docker pull ghcr.io/raylabshq/gitea-mirror:latest ``` ### Configuration Options @@ -483,7 +483,7 @@ Contributions are welcome! Please read our [Contributing Guidelines](CONTRIBUTIN ## License -GNU General Public License v3.0 - see [LICENSE](LICENSE) file for details. +GNU Affero General Public License v3.0 (AGPL-3.0) - see [LICENSE](LICENSE) file for details. ## Star History @@ -498,7 +498,7 @@ GNU General Public License v3.0 - see [LICENSE](LICENSE) file for details. ## Support - 📖 [Documentation](https://github.com/RayLabsHQ/gitea-mirror/tree/main/docs) -- 🔐 [Custom CA Certificates](docs/CA_CERTIFICATES.md) +- 🔐 [Environment Variables](docs/ENVIRONMENT_VARIABLES.md) - 🐛 [Report Issues](https://github.com/RayLabsHQ/gitea-mirror/issues) - 💬 [Discussions](https://github.com/RayLabsHQ/gitea-mirror/discussions) - 🔧 [Proxmox VE Script](https://community-scripts.github.io/ProxmoxVE/scripts?id=gitea-mirror) diff --git a/docs/DEVELOPMENT_WORKFLOW.md b/docs/DEVELOPMENT_WORKFLOW.md index bd2a6b0..77139cf 100644 --- a/docs/DEVELOPMENT_WORKFLOW.md +++ b/docs/DEVELOPMENT_WORKFLOW.md @@ -325,8 +325,8 @@ bun test 4. **Create release**: ```bash -git tag v2.23.0 -git push origin v2.23.0 +git tag vX.Y.Z +git push origin vX.Y.Z ``` 5. **Create GitHub release** @@ -349,6 +349,6 @@ git push origin v2.23.0 ## Getting Help -- Check existing [issues](https://github.com/yourusername/gitea-mirror/issues) -- Join [discussions](https://github.com/yourusername/gitea-mirror/discussions) -- Read the [FAQ](./FAQ.md) +- Check existing [issues](https://github.com/RayLabsHQ/gitea-mirror/issues) +- Join [discussions](https://github.com/RayLabsHQ/gitea-mirror/discussions) +- Review project docs in [docs/README.md](./README.md) diff --git a/docs/NIX_DISTRIBUTION.md b/docs/NIX_DISTRIBUTION.md index 3f73258..13ab7a4 100644 --- a/docs/NIX_DISTRIBUTION.md +++ b/docs/NIX_DISTRIBUTION.md @@ -16,7 +16,7 @@ nix run --extra-experimental-features 'nix-command flakes' github:RayLabsHQ/gite nix run github:RayLabsHQ/gitea-mirror/abc123def # Pin to git tag -nix run github:RayLabsHQ/gitea-mirror/v3.8.11 +nix run github:RayLabsHQ/gitea-mirror/vX.Y.Z ``` **How it works:** @@ -110,11 +110,11 @@ GitHub Actions workflow validates builds on every push/PR: Tag releases for version pinning: ```bash -git tag v3.8.11 -git push origin v3.8.11 +git tag vX.Y.Z +git push origin vX.Y.Z # Users can then pin: -nix run github:RayLabsHQ/gitea-mirror/v3.8.11 +nix run github:RayLabsHQ/gitea-mirror/vX.Y.Z ``` ### Phase 4: nixpkgs Submission (Long Term) @@ -143,13 +143,13 @@ nix profile install --extra-experimental-features 'nix-command flakes' github:Ra ```bash # Pin to git tag -nix run github:RayLabsHQ/gitea-mirror/v3.8.11 +nix run github:RayLabsHQ/gitea-mirror/vX.Y.Z # Pin to commit nix run github:RayLabsHQ/gitea-mirror/abc123def # Lock in flake.nix -inputs.gitea-mirror.url = "github:RayLabsHQ/gitea-mirror/v3.8.11"; +inputs.gitea-mirror.url = "github:RayLabsHQ/gitea-mirror/vX.Y.Z"; ``` #### Option 3: NixOS Configuration @@ -160,7 +160,7 @@ inputs.gitea-mirror.url = "github:RayLabsHQ/gitea-mirror/v3.8.11"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; gitea-mirror.url = "github:RayLabsHQ/gitea-mirror"; # Or pin to version: - # gitea-mirror.url = "github:RayLabsHQ/gitea-mirror/v3.8.11"; + # gitea-mirror.url = "github:RayLabsHQ/gitea-mirror/vX.Y.Z"; }; outputs = { nixpkgs, gitea-mirror, ... }: { @@ -257,7 +257,7 @@ git tag -l git ls-remote --tags origin # Test specific tag -nix run github:RayLabsHQ/gitea-mirror/v3.8.11 +nix run github:RayLabsHQ/gitea-mirror/vX.Y.Z ``` --- diff --git a/docs/README.md b/docs/README.md index 9b84818..1890702 100644 --- a/docs/README.md +++ b/docs/README.md @@ -7,6 +7,8 @@ This folder contains engineering and operations references for the open-source G ### Core workflow - **[DEVELOPMENT_WORKFLOW.md](./DEVELOPMENT_WORKFLOW.md)** – Set up a local environment, run scripts, and understand the repo layout (app + marketing site). - **[ENVIRONMENT_VARIABLES.md](./ENVIRONMENT_VARIABLES.md)** – Complete reference for every configuration flag supported by the app and Docker images. +- **[NIX_DEPLOYMENT.md](./NIX_DEPLOYMENT.md)** – User-facing deployment guide for Nix and NixOS. +- **[NIX_DISTRIBUTION.md](./NIX_DISTRIBUTION.md)** – Maintainer notes for packaging, releases, and distribution strategy. ### Reliability & recovery - **[GRACEFUL_SHUTDOWN.md](./GRACEFUL_SHUTDOWN.md)** – How signal handling, shutdown coordination, and job persistence work in v3. @@ -32,8 +34,6 @@ The first user you create locally becomes the administrator. All other configura ## Contributing & support - 🎯 Contribution guide: [../CONTRIBUTING.md](../CONTRIBUTING.md) -- 📘 Code of conduct: [../CODE_OF_CONDUCT.md](../CODE_OF_CONDUCT.md) - 🐞 Issues & feature requests: - 💬 Discussions: - -Security disclosures should follow the process in [../SECURITY.md](../SECURITY.md). +- 🔐 Security policy & advisories: diff --git a/flake.nix b/flake.nix index 862e4f7..8219f29 100644 --- a/flake.nix +++ b/flake.nix @@ -52,7 +52,10 @@ cp -r dist $out/lib/gitea-mirror/ cp -r node_modules $out/lib/gitea-mirror/ cp -r scripts $out/lib/gitea-mirror/ + cp -r src $out/lib/gitea-mirror/ + cp -r drizzle $out/lib/gitea-mirror/ cp package.json $out/lib/gitea-mirror/ + cp tsconfig.json $out/lib/gitea-mirror/ # Create entrypoint script that matches Docker behavior cat > $out/bin/gitea-mirror <<'EOF' @@ -78,7 +81,8 @@ export MIRROR_PULL_REQUEST_CONCURRENCY=''${MIRROR_PULL_REQUEST_CONCURRENCY:-5} # Create data directory mkdir -p "$DATA_DIR" -cd $out/lib/gitea-mirror +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +cd "$SCRIPT_DIR/../lib/gitea-mirror" # === AUTO-GENERATE SECRETS === BETTER_AUTH_SECRET_FILE="$DATA_DIR/.better_auth_secret" @@ -176,7 +180,8 @@ EOF #!${pkgs.bash}/bin/bash export DATA_DIR=''${DATA_DIR:-"$HOME/.local/share/gitea-mirror"} mkdir -p "$DATA_DIR" -cd $out/lib/gitea-mirror +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +cd "$SCRIPT_DIR/../lib/gitea-mirror" exec ${pkgs.bun}/bin/bun scripts/manage-db.ts "$@" EOF chmod +x $out/bin/gitea-mirror-db