Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
neozhu committed Sep 24, 2024
1 parent 3ad76bd commit 9ae4379
Showing 1 changed file with 42 additions and 1 deletion.
43 changes: 42 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,54 @@ Alternatively, you can set the `ApiKey` in the `appsettings.Development.json` fi
2. **Run the Docker Container**:

```bash
docker run -d -p 5000:80 -e API_KEY=your-api-key-here pdfgeneratorapi
docker run -d -p 5000:80 -e AapiKey=your-api-key-here pdfgeneratorapi
```

3. **Access Swagger UI**:

Open your browser and navigate to `http://localhost:5000/swagger`.

### Using Docker Compose

You can also run the application using Docker Compose with the following configuration:

```yaml
version: '3.8'

services:
pdfgeneratorapi:
image: blazordevlab/pdfgeneratorapi:latest
container_name: pdfgeneratorapi_container
ports:
- "8980:8080"
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ApiKey=your-api-key-here
restart: unless-stopped
```
**Steps to Run with Docker Compose**:
1. **Create a `docker-compose.yml` File**:

Save the above configuration into a file named `docker-compose.yml` in your project directory.

2. **Run Docker Compose**:

```bash
docker-compose up -d
```

3. **Access Swagger UI**:

Open your browser and navigate to `http://localhost:8980/swagger` to interact with the API documentation.

**Note**:

- Replace `your-api-key-here` with your actual API key.
- Ensure that the port mapping in the `ports` section matches your desired host and container ports.
- The `restart: unless-stopped` policy ensures that the container restarts automatically unless you stop it manually.

## API Documentation

### Endpoint
Expand Down

0 comments on commit 9ae4379

Please sign in to comment.