@darthcav/ts-http-server 0.3.0 → 0.3.2

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.
Files changed (2) hide show
  1. package/README.md +51 -2
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -107,14 +107,63 @@ dist/ # Compiled output (generated)
107
107
  public/ # Documentation output (generated)
108
108
  ```
109
109
 
110
+ ## Docker
111
+
112
+ ### Build
113
+
114
+ ```shell
115
+ docker build -t ts-http-server .
116
+ ```
117
+
118
+ Available build arguments:
119
+
120
+ | Argument | Default | Description |
121
+ |------------------------|-----------------|-----------------------------------------------|
122
+ | `BUILD_IMAGE` | `node:25-alpine`| Base image for both stages |
123
+ | `APP_USER` | `node` | OS user owning `/app` and running the process |
124
+ | `APP_GROUP` | `node` | OS group owning `/app` |
125
+ | `CONTAINER_EXPOSE_PORT`| `8888` | Port exposed by the container |
126
+
127
+ ```shell
128
+ docker build \
129
+ --build-arg APP_USER=1001 \
130
+ --build-arg APP_GROUP=1001 \
131
+ --build-arg CONTAINER_EXPOSE_PORT=9000 \
132
+ -t ts-http-server .
133
+ ```
134
+
135
+ ### Run
136
+
137
+ ```shell
138
+ docker run --rm -p 8888:8888 ts-http-server
139
+ ```
140
+
141
+ ### Docker Compose
142
+
143
+ ```yaml
144
+ services:
145
+ app:
146
+ image: ts-http-server
147
+ ports:
148
+ - "8888:8888"
149
+ environment:
150
+ NODE_ENV: production
151
+ # Override the running user at runtime (must match a valid UID:GID on the host if needed)
152
+ user: "1001:1001"
153
+ ```
154
+
155
+ > **Note:** `APP_USER`/`APP_GROUP` are baked in at build time via `chown` and `USER`.
156
+ > To override the running user at runtime use the `user:` key in docker-compose,
157
+ > **not** the `environment:` block.
158
+
110
159
  ## License
111
160
 
112
161
  [Apache-2.0](LICENSE)
113
162
 
114
163
  [node-version]: https://img.shields.io/badge/node-%3E%3D25-orange.svg?style=flat-square
115
164
  [node-url]: https://nodejs.org
116
- [version-image]: https://img.shields.io/badge/version-0.3.0-blue.svg?style=flat-square
165
+ [version-image]: https://img.shields.io/badge/version-0.3.2-blue.svg?style=flat-square
117
166
  [ci-badge]: https://github.com/darthcav/ts-http-server/actions/workflows/tests.yml/badge.svg
118
- [coverage-badge]: https://codecov.io/github/darthcav/ts-http-server/branch/dev/graph/badge.svgK8Q4T4N9SG
167
+ [coverage-badge]: https://codecov.io/github/darthcav/ts-http-server/branch/dev/graph/badge.svg?token=K8Q4T4N9SG
119
168
  [coverage-url]: https://codecov.io/github/darthcav/ts-http-server
120
169
  [pages-url]: https://darthcav.github.io/ts-http-server/
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@darthcav/ts-http-server",
3
3
  "description": "A TypeScript HTTP server for Node.js >= 25",
4
- "version": "0.3.0",
4
+ "version": "0.3.2",
5
5
  "author": {
6
6
  "name": "darthcav",
7
7
  "url": "https://github.com/darthcav"
@@ -24,7 +24,7 @@
24
24
  "dist"
25
25
  ],
26
26
  "dependencies": {
27
- "@darthcav/ts-utils": "0.8.2",
27
+ "@darthcav/ts-utils": "0.8.5",
28
28
  "@fastify/accepts": "5.0.4",
29
29
  "@fastify/compress": "8.3.1",
30
30
  "@fastify/cors": "11.2.0",
@@ -33,18 +33,18 @@
33
33
  "@fastify/static": "9.0.0",
34
34
  "@fastify/view": "11.1.1",
35
35
  "@hapi/boom": "10.0.1",
36
- "@logtape/fastify": "2.0.4",
37
- "@logtape/logtape": "2.0.4",
36
+ "@logtape/fastify": "2.0.5",
37
+ "@logtape/logtape": "2.0.5",
38
38
  "ejs": "5.0.1",
39
- "fastify": "5.8.2"
39
+ "fastify": "5.8.4"
40
40
  },
41
41
  "devDependencies": {
42
- "@biomejs/biome": "2.4.8",
42
+ "@biomejs/biome": "2.4.9",
43
43
  "@types/ejs": "3.1.5",
44
44
  "@types/node": "25.5.0",
45
45
  "asserttt": "1.0.1",
46
46
  "shx": "0.4.0",
47
- "typedoc": "0.28.17"
47
+ "typedoc": "0.28.18"
48
48
  },
49
49
  "repository": {
50
50
  "type": "git",