create readme
This commit is contained in:
parent
b3aac6060f
commit
264f115e7d
2 changed files with 60 additions and 2 deletions
59
README.md
Normal file
59
README.md
Normal file
|
@ -0,0 +1,59 @@
|
|||
# refractr
|
||||
|
||||
refractr is an automated push mirroring utility that clones one repository and can push it's branches to multiple different remotes. It can be ran once or over an interval using built-in scheduling or using cron jobs. Designed to be flexible on it's use, multiple repositories can be mirrored using several different configuration TOML files, or by running multiple instances of refractr with one configuration each.
|
||||
|
||||
## How does it work?
|
||||
|
||||
refractr reads a [configuration](src/example/config.toml) file that you specify to clone a repository over HTTP(S) or SSH to a location on your disk and push to update repositories that already exist on one or more remotes using SSH.
|
||||
|
||||
With the above procedure, refractr can be used to mirror public repositories to copies of your own (such as a fork or to make available on alternative hosting services), to mirror internal corporate repositories on a public network to please FOSS licensing agreements, or whatever your mind can think of!
|
||||
|
||||

|
||||
|
||||
## Installation
|
||||
|
||||
### Cargo
|
||||
|
||||
To install refractr using Cargo, run:
|
||||
|
||||
```sh
|
||||
cargo install --git https://git.brysonsteck.xyz/brysonsteck/refractr
|
||||
```
|
||||
|
||||
### Docker
|
||||
|
||||
To run refractr using Docker, run:
|
||||
|
||||
```sh
|
||||
docker run -it git.brysonsteck.xyz/brysonsteck/refractr refractr
|
||||
```
|
||||
|
||||
You can build custom images with your configs using a [Dockerfile](Dockerfile), or you can build the image entirely from source using the [package Dockerfile](package.Dockerfile) that is used to create the base images:
|
||||
|
||||
```sh
|
||||
git clone https://git.brysonsteck.xyz/brysonsteck/refractr && cd refractr
|
||||
docker build -t refractr --build-arg UID=$(id -u) --build-arg GID=$(id -g) -f package.Dockerfile .
|
||||
```
|
||||
|
||||
### Windows
|
||||
|
||||
Coming soon...
|
||||
|
||||
### macOS
|
||||
|
||||
Coming soon...
|
||||
|
||||
### Build from Source
|
||||
|
||||
To build and run refractr from source, run:
|
||||
|
||||
```sh
|
||||
# the apt command only applies to Ubuntu/Debian
|
||||
# you will need to install the correct packages using your package manager otherwise
|
||||
apt install git pkg-config libssl-dev
|
||||
git clone https://git.brysonsteck.xyz/brysonsteck/refractr && cd refractr
|
||||
cargo build --release
|
||||
# you can run the binary in the target directory
|
||||
# or move it wherever you wish
|
||||
./target/release/refractr
|
||||
```
|
|
@ -7,8 +7,7 @@ WORKDIR /usr/src/refractr
|
|||
COPY . .
|
||||
|
||||
RUN apt update && apt install pkg-config libssl-dev -y
|
||||
RUN cargo build --release
|
||||
RUN cargo install --locked --path .
|
||||
RUN cargo install --path .
|
||||
|
||||
RUN groupadd -g $GID refractr
|
||||
RUN useradd -u $UID -g $GID -mN refractr
|
||||
|
|
Loading…
Add table
Reference in a new issue