This Rust program facilitates the downloading and setting up Docker Compose files. It allows users to manage and list applications and authors, and to copy relevant Docker Compose files to specified directories.
- Download and Extract Docker Compose Files: Automatically download and extract the latest Docker Compose files from https://github.com/luigi311/Container-Server-Templates
- List Apps and Authors: List all available apps and authors in the data.
- Match App and Author Names: Find the closest matches for app and author names using the Jaro-Winkler similarity metric.
- Copy Docker Compose Files: Copy Docker Compose files to a specified output directory.
-
Clone the repository:
git clone https://github.com/luigi311/Container-Server.git cd Container-Server
-
Build the project:
cargo build --release
-
Set up environment variables: Create a
.env
file in the project root and add the following variables:TEMPLATES_FOLDER=Docker_Compose DOCKER_COMPOSE_FOLDER=.
container-server [OPTIONS]
--app <APP>
: Specify the app name.--author <AUTHOR>
: Specify the author name.--list-apps
: List all the apps.--list-authors
: List all the authors.--update
: Update the Docker Compose folder by downloading and extracting the latest files.
-
List all apps:
container-server --list-apps
-
List all authors:
container-server --list-authors
-
Find a specific app and list its authors:
container-server --app <APP_NAME>
-
Find a specific author and list their apps:
container-server --author <AUTHOR_NAME>
-
Copy Docker Compose file for a specific app and author:
container-server --app <APP_NAME> --author <AUTHOR_NAME>
-
Update the Docker Compose folder:
container-server --update
TEMPLATES_FOLDER
: The folder containing the Docker Compose templates.DOCKER_COMPOSE_FOLDER
: The output directory where Docker Compose files will be copied.
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.
This project is licensed under the GNUv3 License. See the LICENSE
file for more information.