Giter Club home page Giter Club logo

compose-generator's Introduction

Compose Generator Logo

Compose Generator

Easy to use cli tool to generate Docker Compose configurations blazingly fast.


Please visit the documentation on compose-generator.com.

If Compose Generator helps you, please consider a GitHub star! โญ

Install Compose Generator

To install Compose Generator on your system, please visit the installation section in the documentation. Compose Generator is available for the latest versions of Alpine, CentOS, Debian, Fedora, Raspbian, Ubuntu and Windows. If you want to install Compose Generator manually by downloading a package file, please take a look at the table below.

After installing, you can use Compose Generator in the terminal like this:

$ compose-generator [<command>]

QuickStart with Docker

For Linux:

$ docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd):/cg/out chillibits/compose-generator [<command>]

For Windows:

$ docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock -v ${pwd}:/cg/out chillibits/compose-generator [<command>]

Note: This command does not work with Windows CMD command line. Please use Windows Terminal or PowerShell instead.

Supported host systems & file downloads

There are downloadable packages available for all supported platforms:

Platform amd64 i386 armv5 armv6 armv7 arm64
Darwin / MacOS (tar.gz) download - - - - -
Alpine (apk) download download download download download download
CentOS (rpm) download download download download download download
Debian (deb) download download download download download download
Fedora (rpm) download download download download download download
Raspbian (deb) download download - download download download
Ubuntu (deb) download download download download download download
Windows Installer (msi) download download - - - -
Windows Portable (zip) download download - - - -

Contribute by providing predefined templates

If you miss a predefined template and you want to create one for the public, please read the instructions to create a template. Fork the repository, create the template and open a pr against the release/v1.10.x branch. The community is thankful for every predefined template!

Contribute otherwise to the project

If you want to contribute to this project, please ensure you comply with the contribution guidelines.

ยฉ Marc Auberer 2021-2022

compose-generator's People

Contributors

0kyn avatar dependabot[bot] avatar github-actions[bot] avatar marcauberer avatar tschuehly avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

compose-generator's Issues

Dynamic Generation of compose files instead of templates

Instead of having templates for predefined stacks, a dynamic approach would be much more efficent.

We have several questions when generating a docker-compose

  1. Is it a dev or production enviroment?

Include nginx reverse proxy: jwilder/nginx-proxy , include let's encry: jrcs/letsencrypt-nginx-proxy-companion

  1. Do you want a frontend? Which one?

Angular / React / Vue -> does frontend exist? no -> run create-react-app / npx create-next-app / ng new

  1. What Backend do you want to use?

Spring / Node / PHP / Rust -> does backend exist? no -> run sprinig initializer / ...

  1. What DB you want to use?

Postgres / MariaDB / Mongo / H2 / ....

  1. Do you want a DB Admin tool

Phpmyadmin, pgAdmin

[BUG] Invalid compose file for React + Node + Postgres + Adminer

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

ERROR: The Compose file './docker-compose.yml' is invalid because:
Unsupported config option for networks: 'backend-database'
Unsupported config option for services: 'backend-node'

my docker-compose.yml file generated like this: docker-compose.yml file

Expected Behavior

running project by command docker-compose up

Steps To Reproduce

generated stack: react + node + postgres + adminer

Environment

- OS:Ubuntu 20.04
- Installation method:deb file
- npm:8.15.0

Docker version 20.10.18, build b40c2f6
docker-compose version 1.25.0, build unknown

Anything else?

why compose-generator doesn't startd without sudo?

[QUESTION] Can this be used to generate custom-only docker compose configs, or do we have to use a predefined template for it to work?

Currently, I understand we can use 'custom' backends, etc. in the prompt by choosing custom services and defining the Docker image to pull, env vars, network exposure, etc.

However, I am encountering the issue that if you only are working with a custom service definition and no other templated service definitions the program hard-errors on "No templates selected." and aborts.

Is this by-design? Or is this a bug? (If this is a bug I'll re-file as a Bug type issue and follow your layout/template)

[FEAT] Support ARM (M1) for Docker

Is there an existing issue for this?

  • I have searched the existing issues

Problem-related

Running the docker image on arm (M1) is not supported.

Suggestion

Add linux/arm64/v8 to the build-process.

Alternative

No response

Additional context

No response

[BUG] Cannot create "custom" configuration with no other templates chosen

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Following the "from scratch" guide, after installing the compose-generator from the repository listed in the documentation, I am following the setup process and setting up a single-container "custom" environment - I choose a custom frontend, and follow all the config steps, and leave all other options left alone, and get an error at the end about "no templates selected", and it aborts.

Expected Behavior

I would expect that the 'custom' compose file would still be generated rather than it erroring saying it can't do it because no templates are selected.

Detailed steps in next section.

Steps To Reproduce

  1. Execute compose-generator g
  2. Name = Test
  3. Doesn't matter if prod-ready is selected or not (using N for now)
  4. Custom Frontend
    • Don't build from source
    • Standard docker registry (docker.io)
    • Use hello-world for a test.
    • frontend-hello-world for service name
    • (same for container)
    • Do not add volumes
    • Do not add networks
    • Do not expose ports
    • No env vars
    • No env files
  5. Do not select any backend services, database services, or admin services
  6. Do not include Watchtower.

Error will happen similar to:

ERROR: 2023/02/15 19:16:48 No templates selected. Aborting ...

Environment

- OS: Ubuntu 20.04 (and 22.04)
- Installation method: APT package manager via specified repositories
- Compose Generator version: 1.9.0 built on 2022-07-02 21:44:48 UTC by github-actions

Anything else?

Original question RE: this is here #431

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.