Skip to content

Commit

Permalink
refine
Browse files Browse the repository at this point in the history
  • Loading branch information
eelcofolkertsma authored Apr 1, 2024
1 parent 35e3018 commit 1a467aa
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions docs/docker/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,34 @@ Tentative usage. still buggy

# developing the functionality
## Concept
- Run container forever (sleep infinity) for asyncapi/cli image
- Open command prompt in container
- Spawn glee project
- Install the project
- File the image
- Run container from this image where glee project is bound to local file system
- Make container persitent with sleep command
- Open command-prompt in container for Glee commands (npm run dev, ctrl-c) and monitoring glee log
- open editor in local file system to edit the glee project
- Glee files are now visible in local filesystem for editing

## Usage
### prepare your project
- install docker on your workstation (see docker website)
- create a local folder to host your Glee project
- create a local folder to host your Glee projects
- download docker-compose.yaml into this folder
- run the docker compose up command. This brings up a container with Glee
- run the docker compose up command. This brings up a container with asyncapi/cli
- run docker command to open a container command prompt: docker exec -it name-of-container sh
### at container command prompt
- launch glee server with npm: npm run dev
- terminate glee with ctrl-C
- create glee project e.g. asyncapi new glee --name=tutorial --template tutorial
- follow instructions to install and launch glee
- change permission on Glee files so they can be edited in local file system with command chown.....
- monitor glee log
- terminate glee server with ctrl-c
### in local workstation
- navigate to glee project (one directory down from docker-compose file)
- edit asyncapi.yaml to bind Glee server to your broker of preference (server: host, protocol).
On file of change Glee notices and rebuilds/relaunches the server
- edit a function in function folder to define new behavior
- add operations to asyncapi.yaml
- refer to Glee tutorial for help with Glee itself (https://www.asyncapi.com/docs/tools/glee, https://www.asyncapi.com/docs/tutorials/generate-code)

## Pitfalls
- websocket port at glee server: xxxxxxxx
- you may want to reset your Glee contents. Do not remove the local folder (this gives weird Docker issues). Recommended approach:
- open a container command prompt
- go one directory up (cd ..)
Expand Down

0 comments on commit 1a467aa

Please sign in to comment.