Skip to content

Commit

Permalink
feedback update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertMcCann committed Sep 13, 2023
1 parent 8c2b483 commit de57900
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@ Send a HTML or Mustache template and recieve a PDF stream as the response.

## Install and start

### Docker container
### Node App - Running a local html-pdf-instance in a docker container

Navigate to quay.io/ukhomeofficedigital/html-pdf-converter to find latest tagged version this will be the image that docker will pull.
Navigate to quay.io/ukhomeofficedigital/html-pdf-converter to find latest the tagged version. Docker will pull whichever version you specify.

For example, if the latest tagged version v2.4.3 then this command will need to be run:

```bash
docker pull quay.io/ukhomeofficedigital/html-pdf-converter:v2.4.3
```
Once completed you can check quay.io/ukhomeofficedigital/html-pdf-converter repository is installed by running:
Once completed you can check the image is available locally by running:
```bash
docker image list
```
All HOF forms run locally on port 8080 and in some cases port 8081 may also be in use; so the html-pdf-converter should be run on another port. Currently port 8082 is recommended.

```bash
docker run -t -i -p 8082:8080 quay.io/ukhomeofficedigital/html-pdf-converter:v2.4.3
docker run -t -i -p 8082:8080 quay.io/ukhomeofficedigital/html-pdf-converter:**<tag>**
```

Observe following in terminal:
Expand All @@ -41,14 +41,14 @@ Note: The terminal will say that the application is listening on port 8080, howe
docker ps -a
```

The HOF form service that is using the html to pdf converter will need to be run locally too. The service will need the following env variable:
The Node app that is using the html to pdf converter will need to be run locally too. The service will need the following env variable:

- `PDF_CONVERTER_URL`: If you are running a local PDF converter this is the url and port it is running on. This URL should be in the format `PDF_CONVERTER_URL=http://localhost:<PORT>/convert`.

- In this example the PDF_CONVERTER_URL should look like `PDF_CONVERTER_URL=http://localhost:8082/convert`
- In this example the PDF_CONVERTER_URL would be `PDF_CONVERTER_URL=http://localhost:8082/convert`


Upon a successful html to pdf conversion the output should look something like this:
Upon a successful html to pdf conversion the response should look something like this:

```bash
2023-09-12T15:31:30.249Z - info: status=201, method=POST, url=/convert, response_time=392, content_length=39644
Expand Down

0 comments on commit de57900

Please sign in to comment.