Skip to content

luigi311/Container-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Container Server

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.

Features

  • 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.

Installation

  1. Clone the repository:

    git clone https://github.com/luigi311/Container-Server.git
    cd Container-Server
  2. Build the project:

    cargo build --release
  3. Set up environment variables: Create a .env file in the project root and add the following variables:

    TEMPLATES_FOLDER=Docker_Compose
    DOCKER_COMPOSE_FOLDER=.

Usage

container-server [OPTIONS]

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.

Examples

  • 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

Environment Variables

  • TEMPLATES_FOLDER: The folder containing the Docker Compose templates.
  • DOCKER_COMPOSE_FOLDER: The output directory where Docker Compose files will be copied.

Contributing

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes.
  4. Commit your changes (git commit -am 'Add new feature').
  5. Push to the branch (git push origin feature-branch).
  6. Create a new Pull Request.

License

This project is licensed under the GNUv3 License. See the LICENSE file for more information.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published