Skip to content

Commit c0e52d1

Browse files
nightknightoasyncapi-botTRohit20anshgoyalevilthulieblack
authored
refactor: create a docker compose and replace mounting with develop (asyncapi#3943)
* refactor: create a docker compose and update documentation * refactor: replace volume with develop in docker compose --------- Co-authored-by: Chan <bot+chan@asyncapi.io> Co-authored-by: Rohit <108233235+TRohit20@users.noreply.github.com> Co-authored-by: Ansh Goyal <anshgoyal1704@gmail.com> Co-authored-by: V Thulisile Sibanda <66913810+thulieblack@users.noreply.github.com>
1 parent 88d5584 commit c0e52d1

File tree

2 files changed

+21
-10
lines changed

2 files changed

+21
-10
lines changed

README.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -120,17 +120,11 @@ Generated files of the storybook go to the `storybook-static` folder.
120120
- [install Docker](https://docs.docker.com/get-docker/)
121121

122122

123-
After cloning repository to your local, perform the following steps from the root of the repository.
123+
After cloning repository to your local, run the docker compose in watch mode from the root of the repository.
124124

125-
#### Steps:
126-
1. Build the Docker image:
127-
```bash
128-
docker build -t asyncapi-website .
129-
```
130-
2. Start the container:
131-
```bash
132-
docker run --rm -it -v "$PWD":/async -p 3000:3000 asyncapi-website
133-
```
125+
```bash
126+
docker compose up --watch
127+
```
134128

135129
Now you're running AsyncAPI website in a development mode. Container is mapped with your local copy of the website. Whenever you make changes to the code, the website will refresh and changes visible in localhost:3000.
136130

docker-compose.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
services:
2+
website:
3+
container_name: asyncapi-website
4+
image: asyncapi-website
5+
build: .
6+
pull_policy: build
7+
ports:
8+
- 3000:3000
9+
develop:
10+
watch:
11+
- path: .
12+
target: /async
13+
action: sync
14+
- path: package.json
15+
action: rebuild
16+
17+

0 commit comments

Comments
 (0)