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

chore: add docker file #2179

Merged
merged 20 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 as development

WORKDIR /async

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

# Copy the rest of the application files
COPY . .
captain-Akshay marked this conversation as resolved.
Show resolved Hide resolved

# 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 @@ -97,6 +97,28 @@ npm run build

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

### Run locally using Docker
Prerequisites:
- Docker installed
captain-Akshay marked this conversation as resolved.
Show resolved Hide resolved

#### Steps:
captain-Akshay marked this conversation as resolved.
Show resolved Hide resolved
1. Build the Docker image:
```bash
docker build -t asyncapi-website -f Dockerfile .`
captain-Akshay marked this conversation as resolved.
Show resolved Hide resolved
```
2. Start the container:
```bash
docker run -d -p 3000:3000 asyncapi-website
```
##### Note: To run a Docker container from the image, mapping the local fork of the repo to the container, run the following command (build the image first!)
```bash
docker run -d -v "$PWD":/async -p 3000:3000 asyncapi-website
```

##### To shutdown the Docker container:
```bash
docker run --rm
```
captain-Akshay marked this conversation as resolved.
Show resolved Hide resolved
## Case studies

### Overview
Expand Down
Loading