|
||
---|---|---|
src | ||
.dockerignore | ||
.drone.yml | ||
.gitignore | ||
data.json | ||
docker-compose.yml | ||
Dockerfile | ||
LICENSE | ||
package.json | ||
README.md | ||
start.sh | ||
tsconfig.json |
Gitea Forwarder

A simple way to mirror repositories on gitea
How to use
Just follow the examples detailed below
Environment Variables
PORT
Given directly to 0http
The port to publish the application upon, defaults to 3000
SSL_CERT_PATH
Given directly to low-http-server
The path to an ssl certificate, no default
SSL_KEY_PATH
Given directly to low-http-server
The path to an ssl key, no default
SSL_PASSWORD
Given directly to low-http-server
The password for the SSL certification, no default
DATA
Environment version of data.json, no default
README_NAME
The name of the user that will commit the readme changes (if enabled), defaults to GiteaForwarder
README_EMAIL
The email of the user that will commit the readme changes (if enabled), defaults to donotreply@bb1.fun
Examples
Docker run
With an environment variable
docker run --name forwarder -e PORT=80 -e README_NAME=GiteaForwarder -e README_EMAIL=donotreply@bb1.fun -e DATA='[{"origin":"https://git.example.com/user/repo","recipients":[{"modifyReadme":true,"url":"https://gitlab.com/user/repo","authors":[{"old":"user@example.com","email":"00000000+user@users.noreply.github.com","name":"user"}]}]}]' -p 80:80 -d bradbot1/gitea-forwarder
With a volume mount (preffered)
docker run --name forwarder -e PORT=80 -e README_NAME=GiteaForwarder -e README_EMAIL=donotreply@bb1.fun -v ./data.json:./data.json -p 80:80 -d bradbot1/gitea-forwarder
You can find an example of data.json here
Docker compose
With an environment variable
version: '3'
services:
forwarder:
image: bradbot1/gitea-forwarder
ports:
- '80:80'
environment:
PORT: 80
DATA: '[{"origin":"https://git.example.com/user/repo","recipients":[{"url":"https://gitlab.com/user/repo","authors":[{"old":"user@example.com","email":"00000000+user@users.noreply.github.com","name":"user"}]}]}]'
README_NAME: GiteaForwarder
README_EMAIL: donotreply@bb1.fun
With a volume mount (preffered)
version: '3'
services:
forwarder:
build: .
image: bradbot1/gitea-forwarder
ports:
- '80:80'
environment:
PORT: 80
README_NAME: GiteaForwarder
README_EMAIL: donotreply@bb1.fun
volumes:
- ./data.json:./data.json
source: docker-compose.yml
[
{
"origin": "https://git.example.com/user/repo",
"webhook": "CustomWebhookSlug",
"recipients": [
{
"url": "https://gitlab.com/user/repo",
"humanName": "An optional human name for logging",
"authors": [
{
"old": "user@example.com",
"email": "00000000+user@users.noreply.github.com",
"name": "user"
},
{
"old": "user2@example.com",
"email": "00000001+user2@users.noreply.github.com",
"name": "user2"
}
],
"modifyReadme": true
}
]
}
]
source: data.json