Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Run Glee in a container #735

Open
2 tasks done
eelcofolkertsma opened this issue Mar 11, 2024 · 1 comment · May be fixed by #738
Open
2 tasks done

[FEATURE] Run Glee in a container #735

eelcofolkertsma opened this issue Mar 11, 2024 · 1 comment · May be fixed by #738
Labels
enhancement New feature or request

Comments

@eelcofolkertsma
Copy link

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

  • get away from USER root
  • .gyp and python to be included in cli image
  • improve naming of directory in local file system
  • smart permissions on directory in local file system
  • documentation on usage
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?

  • I checked and didn't find a similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue?

Yes I am willing to submit a PR!

@eelcofolkertsma eelcofolkertsma added the enhancement New feature or request label Mar 11, 2024
@KhudaDad414
Copy link
Member

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.

@eelcofolkertsma eelcofolkertsma linked a pull request Mar 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants