Skip to content

Commit

Permalink
chore: add docker file (#2179)
Browse files Browse the repository at this point in the history
Co-authored-by: Akshat Nema <[email protected]>%0ACo-authored-by: Lukasz Gornicki <[email protected]>
  • Loading branch information
captain-Akshay and derberg authored Dec 19, 2023
1 parent c17625d commit 70011d3
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
.next
.github
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Development Docker file
FROM node:18-alpine

WORKDIR /async

# Install development dependencies
COPY package.json package-lock.json ./
RUN npm install

# Copy the rest of the application files
COPY . .

# Expose the port for development (if needed)
EXPOSE 3000

# Set environment variables for development (optional)
ENV NODE_ENV=development

CMD ["npm", "run", "dev"]
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,28 @@ npm run build

Generated files of the website go to the `.next` folder.

### Run locally using Docker

#### Prerequisites:

- [install Docker](https://docs.docker.com/get-docker/)


After cloning repository to your local, perform the following steps from the root of the repository.

#### Steps:
1. Build the Docker image:
```bash
docker build -t asyncapi-website .`
```
2. Start the container:
```bash
docker run --rm -it -v "$PWD":/async -p 3000:3000 asyncapi-website
```

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.
## Case studies
### Overview
Expand Down

0 comments on commit 70011d3

Please sign in to comment.