Skip to content

Commit 3fbbaf8

Browse files
committed
Update docs for renamed Docker Hub image
1 parent 55d803f commit 3fbbaf8

6 files changed

Lines changed: 166 additions & 95 deletions

File tree

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
services:
2+
html2rss:
3+
image: html2rss/web:latest
4+
env_file: .env
5+
6+
caddy:
7+
image: caddy:2-alpine
8+
depends_on:
9+
- html2rss
10+
command:
11+
- caddy
12+
- reverse-proxy
13+
- --from
14+
- ${CADDY_HOST}
15+
- --to
16+
- html2rss:3000
17+
ports:
18+
- "80:80"
19+
- "443:443"
20+
volumes:
21+
- caddy_data:/data
22+
23+
watchtower:
24+
image: containrrr/watchtower
25+
depends_on:
26+
- html2rss
27+
- caddy
28+
command:
29+
- --cleanup
30+
- --interval
31+
- "300"
32+
- html2rss
33+
- caddy
34+
volumes:
35+
- /var/run/docker.sock:/var/run/docker.sock:ro
36+
restart: unless-stopped
37+
38+
volumes:
39+
caddy_data:
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
---
2+
import Code from "astro/components/Code.astro";
3+
import {
4+
browserlessImage,
5+
caddyImage,
6+
watchtowerImage,
7+
webImage,
8+
} from "../../data/docker";
9+
10+
interface Props {
11+
variant:
12+
| "minimal"
13+
| "productionCaddy"
14+
| "secure"
15+
| "watchtower"
16+
| "resourceGuardrails";
17+
}
18+
19+
const { variant } = Astro.props;
20+
21+
const snippets: Record<Props["variant"], string> = {
22+
minimal: `services:
23+
html2rss-web:
24+
image: ${webImage}
25+
restart: unless-stopped
26+
ports:
27+
- "127.0.0.1:3000:3000"
28+
volumes:
29+
- type: bind
30+
source: ./feeds.yml
31+
target: /app/config/feeds.yml
32+
read_only: true
33+
environment:
34+
RACK_ENV: production
35+
HEALTH_CHECK_USERNAME: health
36+
HEALTH_CHECK_PASSWORD: CHANGE_THIS_PASSWORD_BEFORE_USE
37+
BROWSERLESS_IO_WEBSOCKET_URL: ws://browserless:3001
38+
BROWSERLESS_IO_API_TOKEN: 6R0W53R135510
39+
40+
browserless:
41+
image: "${browserlessImage}"
42+
restart: unless-stopped
43+
ports:
44+
- "127.0.0.1:3001:3001"
45+
environment:
46+
PORT: 3001
47+
CONCURRENT: 10
48+
TOKEN: 6R0W53R135510`,
49+
productionCaddy: `services:
50+
caddy:
51+
image: ${caddyImage}
52+
ports:
53+
- "80:80"
54+
- "443:443"
55+
volumes:
56+
- caddy_data:/data
57+
command:
58+
- caddy
59+
- reverse-proxy
60+
- --from
61+
- \${CADDY_HOST}
62+
- --to
63+
- html2rss:3000
64+
html2rss:
65+
image: ${webImage}
66+
env_file: .env
67+
68+
volumes:
69+
caddy_data:`,
70+
secure: `services:
71+
html2rss:
72+
image: ${webImage}
73+
environment:
74+
RACK_ENV: production
75+
LOG_LEVEL: warn
76+
HEALTH_CHECK_USERNAME: your-secure-username
77+
HEALTH_CHECK_PASSWORD: your-very-secure-password
78+
BASE_URL: https://yourdomain.com`,
79+
watchtower: `services:
80+
watchtower:
81+
image: ${watchtowerImage}
82+
depends_on:
83+
- html2rss
84+
- caddy
85+
command:
86+
- --cleanup
87+
- --interval
88+
- "300"
89+
- html2rss
90+
- caddy
91+
volumes:
92+
- /var/run/docker.sock:/var/run/docker.sock:ro
93+
restart: unless-stopped`,
94+
resourceGuardrails: `services:
95+
html2rss:
96+
image: ${webImage}
97+
deploy:
98+
resources:
99+
limits:
100+
memory: 512M
101+
cpus: "0.5"
102+
reservations:
103+
memory: 256M
104+
cpus: "0.25"`,
105+
};
106+
107+
const code = snippets[variant];
108+
---
109+
110+
<Code code={code} lang="yaml" />
Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,5 @@
11
---
2-
import Code from "astro/components/Code.astro";
3-
4-
const code = `services:
5-
html2rss-web:
6-
image: gilcreator/html2rss-web
7-
restart: unless-stopped
8-
ports:
9-
- "127.0.0.1:3000:3000"
10-
volumes:
11-
- type: bind
12-
source: ./feeds.yml
13-
target: /app/config/feeds.yml
14-
read_only: true
15-
environment:
16-
RACK_ENV: production
17-
HEALTH_CHECK_USERNAME: health
18-
HEALTH_CHECK_PASSWORD: CHANGE_THIS_PASSWORD_BEFORE_USE
19-
BROWSERLESS_IO_WEBSOCKET_URL: ws://browserless:3001
20-
BROWSERLESS_IO_API_TOKEN: 6R0W53R135510
21-
22-
browserless:
23-
image: "ghcr.io/browserless/chromium"
24-
restart: unless-stopped
25-
ports:
26-
- "127.0.0.1:3001:3001"
27-
environment:
28-
PORT: 3001
29-
CONCURRENT: 10
30-
TOKEN: 6R0W53R135510`;
2+
import DockerComposeSnippet from "./DockerComposeSnippet.astro";
313
---
324

33-
<Code code={code} lang="yaml" />
5+
<DockerComposeSnippet variant="minimal" />

src/content/docs/web-application/how-to/deployment.mdx

Lines changed: 6 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ title: "Deployment & Production"
33
description: "Deploy html2rss-web to production with Docker. Learn best practices for hosting public instances with security, monitoring, and reliability."
44
---
55

6+
import DockerComposeSnippet from "../../../../components/docs/DockerComposeSnippet.astro";
7+
68
html2rss-web ships on Docker Hub, so you can launch it wherever Docker runs. Start with the official [`docker-compose.yml`](https://github.com/html2rss/html2rss-web/blob/master/docker-compose.yml) from the [Installation Guide](/web-application/getting-started) as your baseline.
79

810
If you have not yet created a local instance, complete the [Getting Started guide](/web-application/getting-started) first. It walks through the one-time project directory setup, downloading the reference compose file, and confirming the application locally—steps we will build upon here.
@@ -25,29 +27,7 @@ A reverse proxy accepts public HTTPS traffic, terminates TLS, and forwards reque
2527

2628
Caddy handles certificates and redirects with almost no configuration.
2729

28-
```yaml
29-
services:
30-
caddy:
31-
image: caddy:2-alpine
32-
ports:
33-
- "80:80"
34-
- "443:443"
35-
volumes:
36-
- caddy_data:/data
37-
command:
38-
- caddy
39-
- reverse-proxy
40-
- --from
41-
- ${CADDY_HOST}
42-
- --to
43-
- html2rss:3000
44-
html2rss:
45-
image: gilcreator/html2rss-web:latest
46-
env_file: .env
47-
48-
volumes:
49-
caddy_data:
50-
```
30+
<DockerComposeSnippet variant="productionCaddy" />
5131

5232
- Create a `.env` file beside your compose file with the following variables:
5333

@@ -79,17 +59,7 @@ Harden the application before inviting other users:
7959
- Prefer environment files (`.env`) stored outside version control for secrets
8060
- Keep admin-only routes behind basic auth or IP restrictions in your proxy
8161

82-
```yaml
83-
services:
84-
html2rss:
85-
image: gilcreator/html2rss-web:latest
86-
environment:
87-
RACK_ENV: production
88-
LOG_LEVEL: warn
89-
HEALTH_CHECK_USERNAME: your-secure-username
90-
HEALTH_CHECK_PASSWORD: your-very-secure-password
91-
BASE_URL: https://yourdomain.com
92-
```
62+
<DockerComposeSnippet variant="secure" />
9363

9464
Store these variables in a `.env` file and reference it with `env_file:` as demonstrated in the Caddy example.
9565

@@ -104,41 +74,13 @@ Keep the instance healthy once it is in production:
10474

10575
### Auto-update with Watchtower
10676

107-
```yaml
108-
services:
109-
watchtower:
110-
image: containrrr/watchtower
111-
depends_on:
112-
- html2rss
113-
- caddy
114-
command:
115-
- --cleanup
116-
- --interval
117-
- "300"
118-
- html2rss
119-
- caddy
120-
volumes:
121-
- /var/run/docker.sock:/var/run/docker.sock
122-
restart: unless-stopped
123-
```
77+
<DockerComposeSnippet variant="watchtower" />
12478

12579
Check `docker compose logs watchtower` occasionally to confirm updates are applied.
12680

12781
### Resource Guardrails
12882

129-
```yaml
130-
services:
131-
html2rss:
132-
image: gilcreator/html2rss-web:latest
133-
deploy:
134-
resources:
135-
limits:
136-
memory: 512M
137-
cpus: "0.5"
138-
reservations:
139-
memory: 256M
140-
cpus: "0.25"
141-
```
83+
<DockerComposeSnippet variant="resourceGuardrails" />
14284

14385
Adjust the limits to match your host capacity. Increase memory if you process many large feeds.
14486

src/content/docs/web-application/reference/versioning-and-releases.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ title: Versioning and releases
33
description: Learn about versioning and release strategy for html2rss-web
44
---
55

6+
import { dockerHubRepository, dockerHubUrl } from "../../../../data/docker";
7+
68
This web application is distributed in a [rolling release](https://en.wikipedia.org/wiki/Rolling_release) fashion from the `master` branch.
79

8-
For the latest commit passing GitHub CI/CD on the master branch, an updated Docker image will be pushed to [Docker Hub: `gilcreator/html2rss-web`](https://hub.docker.com/r/gilcreator/html2rss-web).
10+
For the latest commit passing GitHub CI/CD on the master branch, an updated Docker image will be pushed to <a href={dockerHubUrl}>Docker Hub: <code>{dockerHubRepository}</code></a>.
911
The [SBOM](https://en.wikipedia.org/wiki/Software_supply_chain) is embedded in the Docker image.
1012

1113
GitHub's @dependabot is enabled for dependency updates and they are automatically merged to the `master` branch when the CI gives the green light.

src/data/docker.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export const dockerHubRepository = "html2rss/web";
2+
export const dockerHubUrl = `https://hub.docker.com/r/${dockerHubRepository}`;
3+
export const webImage = `${dockerHubRepository}:latest`;
4+
export const browserlessImage = "ghcr.io/browserless/chromium";
5+
export const caddyImage = "caddy:2-alpine";
6+
export const watchtowerImage = "containrrr/watchtower";

0 commit comments

Comments
 (0)