bits-to-dead-trees 2.20.0 → 2.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/Dockerfile +0 -6
- package/README.md +2 -2
- package/package.json +1 -1
- package/server.js +10 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# bits-to-dead-trees
|
|
2
2
|
|
|
3
|
+
## 2.21.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#455](https://github.com/rmehner/bits-to-dead-trees/pull/455) [`ee7af32`](https://github.com/rmehner/bits-to-dead-trees/commit/ee7af32753f14a62f460631178f68992c28f8d6d) Thanks [@rmehner](https://github.com/rmehner)! - Removes tini from the Docker dependencies.
|
|
8
|
+
|
|
9
|
+
This reduces the image size by one layer and one dependency by handling the signals
|
|
10
|
+
ourselves. Fastify supports graceful shutdown, so it's pretty straightforward and
|
|
11
|
+
one thing less to keep in mind.
|
|
12
|
+
|
|
3
13
|
## 2.20.0
|
|
4
14
|
|
|
5
15
|
### Minor Changes
|
package/Dockerfile
CHANGED
|
@@ -6,16 +6,10 @@ ENV SERVER_ADDRESS=0.0.0.0
|
|
|
6
6
|
|
|
7
7
|
WORKDIR /app
|
|
8
8
|
|
|
9
|
-
RUN apt-get update -yqq && \
|
|
10
|
-
apt-get install -yqq --no-install-recommends tini && \
|
|
11
|
-
apt-get clean && \
|
|
12
|
-
rm -rf /var/lib/apt/lists/*
|
|
13
|
-
|
|
14
9
|
COPY ["package.json", "package-lock.json*", "./"]
|
|
15
10
|
|
|
16
11
|
RUN npm install --omit=dev --ignore-scripts
|
|
17
12
|
|
|
18
13
|
COPY ["server.js", "app.js", "pdf_request_body.json", "./"]
|
|
19
14
|
|
|
20
|
-
ENTRYPOINT ["tini", "-v", "--"]
|
|
21
15
|
CMD ["node", "server.js"]
|
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ of that. It's using [Playwright](https://playwright.dev) in the background for t
|
|
|
11
11
|
|
|
12
12
|
### Requirements
|
|
13
13
|
|
|
14
|
-
1. Node
|
|
14
|
+
1. Node 22+
|
|
15
15
|
2. npm
|
|
16
16
|
|
|
17
17
|
### Installation
|
|
@@ -57,7 +57,7 @@ If you want to use it internally with docker-compose, this should give you a goo
|
|
|
57
57
|
```yml
|
|
58
58
|
services:
|
|
59
59
|
pdf:
|
|
60
|
-
image: ghcr.io/rmehner/bits-to-dead-trees:v2.
|
|
60
|
+
image: ghcr.io/rmehner/bits-to-dead-trees:v2.20.0
|
|
61
61
|
ports:
|
|
62
62
|
- 8000:8000
|
|
63
63
|
```
|
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -18,3 +18,13 @@ const server = app({
|
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
await server.listen({ port: +PORT, host: SERVER_ADDRESS });
|
|
21
|
+
|
|
22
|
+
const shutdown = async () => {
|
|
23
|
+
console.log("Shutting down server");
|
|
24
|
+
await server.close();
|
|
25
|
+
// eslint-disable-next-line n/no-process-exit
|
|
26
|
+
process.exit(1);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
process.on("SIGTERM", shutdown);
|
|
30
|
+
process.on("SIGINT", shutdown);
|