GitFortress is a powerful tool designed to synchronize your GitHub repositories in a remote location
1.4K
GitFortress is a powerful tool designed to synchronize your GitHub repositories in a remote location securely and efficiently. This tool ensures your repositories are always backed up and kept in sync with their remote state, offering peace of mind and data security for developers and teams alike.
Pull the GitFortress image using the following command:
docker pull muscaw/gitfortress:latest
Create a config.yml file with the following structure:
inputs:
- name: "Github"
type: github
targetUrl: https://api.github.com
apiToken: "Your Github PAT token"
ignoreRepositoriesRegex: []
- name: "Gitlab"
type: gitlab
targetUrl: https://gitlab.com
apiToken: "Your Gitlab PAT token"
ignoreRepositoriesRegex: []
syncDelay: "5m" # Uses Golang's units. Valid time units are "ns", "us", "ms", "s", "m", "h"
cloneFolderPath: "path/to/clone/folder"
influxDB: # Optional
url: "influx-url"
authToken: "influx-token"
organizationName: "influx-org-name"
bucketName: "influx-bucket-name"
prometheus:
exposedPort: 1000 # exposed port for prometheus consumption
autoConvertNames: false # whether to automatically add a marker for counter type metrics such as _total
GitFortress reads the following paths in the given order. If it finds a valid config file, it will use it and not search for the next config files.
repo to grant full control of private repositories.Generate token button.config.yml as the apiToken value for your Github configuration.read_api, read_user, read_repositoryconfig.yml as the apiToken value for your Gitlab configurationRun GitFortress by executing:
./gitfortress
To run GitFortress using Docker, use the following command:
docker run --rm -v /path/to/config/directory:/etc/gitfortress ghcr.io/Muscaw/GitFortress:latest
Replace /path/to/config/directory with the actual path to your configuration directory.
For Docker Compose, include the following in your docker-compose.yml file:
services:
gitfortress:
image: muscaw/gitfortress:latest
volumes:
- /path/to/config/directory:/etc/gitfortress
- /path/to/clone/directory:/backup
Replace the placeholders with the actual path to your configuration directory.
Both Prometheus and InfluxDB backends are supported and can be configured to publish execution metrics (see config.yml).
A sample dashboard for Grafana is available in the examples folder.

We welcome contributions! Please refer to our CONTRIBUTING.md for guidelines on how to make GitFortress better.
GitFortress is released under the MIT License.
For support or inquiries, please open an issue on the GitHub repository.
Content type
Image
Digest
sha256:81475ebdd…
Size
70.7 MB
Last updated
11 months ago
docker pull muscaw/gitfortress