https://github.com/thevickypedia/backup-git
https://github.com/thevickypedia/backup-git
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/thevickypedia/backup-git
- Owner: thevickypedia
- License: mit
- Created: 2024-04-13T18:46:02.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-29T00:08:24.000Z (over 1 year ago)
- Last Synced: 2025-02-19T12:12:26.853Z (8 months ago)
- Language: Rust
- Size: 52.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GitHub
This is a simple API backed GH actions project, that backs up any files that were updated in the default branch.
### Environment Variables
**Mandatory**
- **authorization** - Token stored in GitHub actions.
- **github_source** - Directory to store the backup.**Optional**
- **debug**: Boolean flag to enable debug level logging. Defaults to `false`
- **utc_logging**: Boolean flag to set timezone to UTC in the output logs. Defaults to `true`
- **server_host**: IP address to host the server. Defaults to `127.0.0.1` / `localhost`
- **server_port**: Port number to host the application. Defaults to `8000`
- **workers**: Number of workers to spin up for the server. Defaults to the number of physical cores.
- **max_connections**: Maximum number of concurrent connections per worker. Defaults to `3`
- **max_payload_size**: Maximum size of files that can be uploaded from the UI. Defaults to `100 MB`
> Input should be in the format, `10 MB`, `3 GB` - _inputs are case insensitive_
- **websites**: Vector of websites (_supports regex_) to add to CORS configuration. _Required only if tunneled via CDN_
- **key_file**: Path to the private key file for SSL certificate. Defaults to `None`
- **cert_file**: Path to the full chain file for SSL certificate. Defaults to `None`### Steps
- The API should be running independently.
- The GH actions, will send the changes to the API which will be stored in the backup location.### Docker
**Build**
```shell
docker build -t github .
```**Run**
```shell
docker run github
```**Copy executable**
```shell
docker cp $(docker ps -aqf "ancestor=github"):/app/target/release/github .
```