asyncapi / glee

Glee ā€” The AsyncAPI framework that will make you smile again :)
87 stars 62 forks source link

[FEATURE] Run Glee in a container #735

Open eelcofolkertsma opened 7 months ago

eelcofolkertsma commented 7 months ago

Why do we need this improvement?

Setting/maintaining a fully functional node environment on local machine can be overwhelming and hard to debug. A container is much easier to deploy/manage

How will this change help?

The prerequisite effort to install Docker or equivalent is shared over many projects. On download of the compose.yaml a simple "docker compose up" launches the Glee server with default settings. From there you can modify the Glee files and stop/restart the Glee server to explore all features of Glee

No need to worry about install of node, .gyp, python etc

Screenshots

No response

How could it be implemented/designed?

A (docker) compose.yaml that pulls asyncapi/cli image, runs new glee, npm install, npm run dev commands and attaches to local filesystem.

A refinement of below yaml

version: '3'

services:
  glee:
    build:
      context: .
      dockerfile_inline: |
        FROM asyncapi/cli
        USER root
        RUN apk add --no-cache --virtual .gyp python3 make g++ && \
            rm -rf /var/lib/apt/lists/* && \
            asyncapi new glee && \
            cd project && \
            npm install
        ENTRYPOINT 
    volumes:
      - ${PWD}/output:/app 
    networks:
      - default
    user: root
    entrypoint: []
    working_dir: /app/project
    command: npm run dev

networks:
  default: {}

šŸš§ Breaking changes

No

šŸ‘€ Have you checked for similar open issues?

šŸ¢ Have you read the Contributing Guidelines?

Are you willing to work on this issue?

Yes I am willing to submit a PR!

KhudaDad414 commented 7 months ago

Hey @eelcofolkertsma,

I'm still getting the hang of Docker, but here's how I see it: we code locally, and the container handles the environment and runs everything, right?

If that's the plan, I'm all good with it! Would love a PR when you get a chance.

github-actions[bot] commented 3 months ago

This issue has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart: