Adding docker support

This commit is contained in:
Luke Hagar
2025-04-01 11:10:42 -05:00
parent 234791eacf
commit 5113ad3f48
2 changed files with 47 additions and 0 deletions

21
Dockerfile Normal file
View File

@@ -0,0 +1,21 @@
FROM node:20-slim
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy source code
COPY . .
# Build TypeScript code
RUN npm run build
# Expose ports for proxy and docs servers
EXPOSE 3000 3001
# Set default command
CMD ["node", "dist/src/cli.js"]

View File

@@ -41,6 +41,32 @@ And view the automatically generated documentation:
open http://localhost:3001/docs open http://localhost:3001/docs
``` ```
### Docker Usage
You can run Arbiter using Docker:
```bash
# Build the Docker image
docker build -t arbiter .
# Run the container
docker run -p 3000:3000 -p 3001:3001 arbiter --target https://api.example.com
```
The container exposes:
- Port 3000 for the proxy server
- Port 3001 for the documentation server
You can customize the ports and other options:
```bash
docker run -p 8080:8080 -p 8081:8081 arbiter \
--target https://api.example.com \
--proxy-port 8080 \
--docs-port 8081 \
--verbose
```
## Usage Options ## Usage Options
| Option | Description | Default | | Option | Description | Default |