Added comprehensive support for custom CA certificates to enable Gitea Mirror to work with self-signed certificates or private CAs
Implemented two flexible mounting options: individual certificates or system CA bundle
Bumped version to v2.21.0
Changes
Docker Setup: Added ca-certificates package to Alpine base image
Certificate Detection: Enhanced docker-entrypoint.sh to automatically detect and configure custom CA certificates
Mounting Options:
Option 1: Mount individual .crt files from ./certs directory
Option 2: Mount system CA bundle directly
Documentation: Created comprehensive guide in certs/README.md with setup instructions
Security: Certificates are mounted read-only with proper permissions
Test Plan
Build Docker image successfully
Test with individual CA certificates in certs directory
Test with system CA bundle mount
Verify NODE_EXTRA_CA_CERTS is set correctly in container logs
Confirm connection to Gitea instance with self-signed certificate
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/RayLabsHQ/gitea-mirror/pull/39
**Author:** [@arunavo4](https://github.com/arunavo4)
**Created:** 7/7/2025
**Status:** ✅ Merged
**Merged:** 7/7/2025
**Merged by:** [@arunavo4](https://github.com/arunavo4)
**Base:** `main` ← **Head:** `custom-ca-cert`
---
### 📝 Commits (1)
- [`9d7cb0f`](https://github.com/RayLabsHQ/gitea-mirror/commit/9d7cb0f3727e3aef668d639973beb7b9c734aaee) feat: add custom CA certificate support
### 📊 Changes
**10 files changed** (+232 additions, -4 deletions)
<details>
<summary>View changed files</summary>
📝 `.env.example` (+7 -0)
📝 `.gitignore` (+6 -0)
📝 `Dockerfile` (+6 -3)
📝 `README.md` (+1 -0)
➕ `certs/README.md` (+149 -0)
📝 `docker-compose.dev.yml` (+7 -0)
📝 `docker-compose.yml` (+7 -0)
📝 `docker-entrypoint.sh` (+47 -0)
➕ `docs/CA_CERTIFICATES.md` (+1 -0)
📝 `package.json` (+1 -1)
</details>
### 📄 Description
## Summary
- Added comprehensive support for custom CA certificates to enable Gitea Mirror to work with self-signed certificates or private CAs
- Implemented two flexible mounting options: individual certificates or system CA bundle
- Bumped version to v2.21.0
## Changes
- **Docker Setup**: Added `ca-certificates` package to Alpine base image
- **Certificate Detection**: Enhanced `docker-entrypoint.sh` to automatically detect and configure custom CA certificates
- **Mounting Options**:
- Option 1: Mount individual `.crt` files from `./certs` directory
- Option 2: Mount system CA bundle directly
- **Documentation**: Created comprehensive guide in `certs/README.md` with setup instructions
- **Security**: Certificates are mounted read-only with proper permissions
## Test Plan
- [ ] Build Docker image successfully
- [ ] Test with individual CA certificates in certs directory
- [ ] Test with system CA bundle mount
- [ ] Verify NODE_EXTRA_CA_CERTS is set correctly in container logs
- [ ] Confirm connection to Gitea instance with self-signed certificate
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/RayLabsHQ/gitea-mirror/pull/39
Author: @arunavo4
Created: 7/7/2025
Status: ✅ Merged
Merged: 7/7/2025
Merged by: @arunavo4
Base:
main← Head:custom-ca-cert📝 Commits (1)
9d7cb0ffeat: add custom CA certificate support📊 Changes
10 files changed (+232 additions, -4 deletions)
View changed files
📝
.env.example(+7 -0)📝
.gitignore(+6 -0)📝
Dockerfile(+6 -3)📝
README.md(+1 -0)➕
certs/README.md(+149 -0)📝
docker-compose.dev.yml(+7 -0)📝
docker-compose.yml(+7 -0)📝
docker-entrypoint.sh(+47 -0)➕
docs/CA_CERTIFICATES.md(+1 -0)📝
package.json(+1 -1)📄 Description
Summary
Changes
ca-certificatespackage to Alpine base imagedocker-entrypoint.shto automatically detect and configure custom CA certificates.crtfiles from./certsdirectorycerts/README.mdwith setup instructionsTest Plan
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.