Skip to content

Commit

Permalink
fix: change the doc
Browse files Browse the repository at this point in the history
  • Loading branch information
thxrhmn committed Apr 29, 2024
1 parent 6d4ad6b commit 234f36e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1 +1 @@
GOTENBERG_API=http://0.0.0.0:4000
GOTENBERG_API=http://YOUR-IP:4000
17 changes: 5 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,20 @@
git clone https://github.com/thxrhmn/html-to-pdf.git
```

## RUN GOTENBERG
```bash
docker run --rm -p 4000:3000 -d gotenberg/gotenberg:8
```

## COPY / FILL .ENV VARIABLE
```bash
cp .env.example .env
```

## BUILD
```bash
docker build -t html-to-pdf:latest .
nano .env
# change with your ip
GOTENBERG_API=http://YOUR-IP:4000 # http://127.0.0.1:4000
```

## RUN
```bash
docker run -d -p 5000:5000 --name html-to-pdf html-to-pdf:latest
docker compose up -d
```

## USAGE:
```bash
curl -X POST -d 'html=<html><head><title>Test</title></head><body><h1>Hello, World!</h1></body></html>' http://localhost:5000/generate-html-pdf -o index.pdf
curl -X POST -d 'html=<html><head><title>Test</title></head><body><h1>Hello, World!</h1></body></html>' http://0.0.0.0:5000/generate-html-pdf -o index.pdf
```

0 comments on commit 234f36e

Please sign in to comment.