Coder Social home page Coder Social logo

compose-generator / compose-generator Goto Github PK

View Code? Open in Web Editor NEW
185.0 4.0 21.0 18.84 MB

๐Ÿณ Easy to use cli tool to generate Docker Compose configurations

Home Page: https://compose-generator.com

License: Apache License 2.0

Batchfile 0.04% Shell 0.26% Go 85.54% Dockerfile 1.41% Python 0.60% PHP 11.61% HTML 0.04% Rust 0.04% TypeScript 0.06% Ruby 0.40%
docker docker-compose generator cli go yaml golang

compose-generator's Issues

[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

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?

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