Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 20 additions & 15 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:
contents: read

jobs:
docker:
build:
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -34,33 +34,36 @@ jobs:

- name: Read VERSION
id: version
run: echo "version=$(cat VERSION)" >> "$GITHUB_OUTPUT"

- name: Login to DockerHub
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
run: cat VERSION >> "$GITHUB_OUTPUT"

- name: Set up QEMU
uses: docker/setup-qemu-action@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4

- name: Login to DockerHub
if: github.ref == 'refs/heads/master'
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v7
with:
context: ${{ matrix.context }}
push: true
context: ${{ matrix.context }}
platforms: linux/amd64 # linux/arm64
push: ${{ github.ref == 'refs/heads/master' }}
tags: |
dockette/rendertron:${{ matrix.tag }}
${{ matrix.tag == 'latest' && format('dockette/rendertron:{0}', steps.version.outputs.version) || '' }}
platforms: linux/amd64 # linux/arm64
${{ matrix.tag == 'latest' && format('dockette/rendertron:{0}', steps.version.outputs.VERSION) || '' }}
cache-from: type=gha
cache-to: type=gha,mode=max

release:
name: "Release"
needs: docker
needs: build
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
runs-on: ubuntu-latest
permissions:
Expand All @@ -72,11 +75,13 @@ jobs:
- name: Create release
env:
GH_TOKEN: ${{ github.token }}
run: gh release view "$(cat VERSION)" || gh release create "$(cat VERSION)" --generate-notes
run: |
. ./VERSION
gh release view "$VERSION" || gh release create "$VERSION" --generate-notes

docs:
name: "Docs"
needs: docker
needs: build
if: github.ref == 'refs/heads/master'
uses: dockette/.github/.github/workflows/dockerhub-description.yml@master
secrets: inherit
Expand Down
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION:=$(shell cat VERSION)
include VERSION

build-rendertron:
docker build -t dockette/rendertron ./rendertron
Expand Down Expand Up @@ -41,6 +41,5 @@ version:

.PHONY: release
release:
@date -u +%Y.%m.%d > VERSION
@echo "VERSION: ${VERSION} -> $$(cat VERSION)"
@echo "next: git commit -am \"Release: $$(cat VERSION)\" && git push"
@sed -i.bak "s/^VERSION=.*/VERSION=$$(date -u +%Y.%m.%d)/" VERSION && rm VERSION.bak
@cat VERSION
55 changes: 40 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,58 @@
# Rendertron
<h1 align=center>Dockette / Rendertron</h1>

Ready-to-use image for SSR rendering based on headless Chrome, [a.k.a Rendertron by Google](https://github.com/GoogleChrome/rendertron).

> All credits belong to the authors of [GoogleChrome/rendertron](https://github.com/GoogleChrome/rendertron).
<p align=center>
<a href="https://github.com/dockette/rendertron/actions"><img src="https://github.com/dockette/rendertron/actions/workflows/docker.yml/badge.svg" alt="GitHub Actions"></a>
<a href="https://hub.docker.com/r/dockette/rendertron"><img src="https://img.shields.io/docker/pulls/dockette/rendertron.svg" alt="Docker Hub pulls"></a>
<a href="https://github.com/sponsors/f3l1x"><img src="https://img.shields.io/badge/sponsor-GitHub%20Sponsors-ea4aaa" alt="GitHub Sponsors"></a>
<a href="https://github.com/orgs/dockette/discussions"><img src="https://img.shields.io/badge/support-discussions-6f42c1" alt="Support/Discussions"></a>
</p>

> **Upstream status:** the [GoogleChrome/rendertron](https://github.com/GoogleChrome/rendertron) project was archived and the upstream README marks it as deprecated. The image here is kept for existing users and the demo screenshot; new projects should evaluate the alternative rendering strategies linked from the upstream README before adopting Rendertron.
<p align=center>
Ready-to-use image for SSR rendering based on headless Chrome.
</p>

-----

<p align=center>
<a href="https://github.com/dockette/rendertron/actions"><img src="https://github.com/dockette/rendertron/actions/workflows/docker.yml/badge.svg" alt="GitHub Actions"></a>
<a href="https://hub.docker.com/r/dockette/rendertron"><img src="https://img.shields.io/docker/pulls/dockette/rendertron.svg" alt="Docker Hub pulls"></a>
<a href="https://github.com/sponsors/f3l1x"><img src="https://img.shields.io/badge/sponsor-GitHub%20Sponsors-ea4aaa" alt="GitHub Sponsors"></a>
<a href="https://github.com/orgs/dockette/discussions"><img src="https://img.shields.io/badge/support-discussions-6f42c1" alt="Support/Discussions"></a>
</p>
[Rendertron](https://github.com/GoogleChrome/rendertron) by Google on headless Chrome. All credits belong to the authors
of [GoogleChrome/rendertron](https://github.com/GoogleChrome/rendertron).

The upstream project is archived and its README marks it as deprecated. This image is kept for existing users and the
demo screenshot. New projects should check the alternative rendering strategies linked from the upstream README before
they use Rendertron.

## Usage

```
```sh
docker run -it --rm -p 3000:3000 dockette/rendertron
```

![Screenshot](.docs/screenshot.png)

## Versions

The release version is the date in [`VERSION`](VERSION). CI pushes `latest` also as `dockette/rendertron:<VERSION>`.
To release, run `make release`, commit and push to `master`.
| Version | Release |
|---------|---------|
| `dockette/rendertron:YYYY.MM.DD` | release `YYYY.MM.DD` |
| `dockette/rendertron:latest` | latest build of `master`, Rendertron on Node.js 20 and Chromium |
| `dockette/rendertron:proxy` | latest build of `master`, nginx proxy in front of Rendertron |
| `dockette/rendertron:tracer` | latest build of `master`, PHP CLI tracer that renders sitemap pages |

Only `latest` has release tags. Releases are listed on [GitHub](https://github.com/dockette/rendertron/releases).

## Development

```sh
make build-rendertron # build dockette/rendertron
make build-proxy # build dockette/rendertron:proxy
make build-tracer # build dockette/rendertron:tracer
make run-rendertron # run Rendertron on port 3000
make run-proxy # run the proxy on port 4000, NGINX_PROXY points to Rendertron
make run-tracer # run the tracer against a Rendertron server and sitemaps
make version # print VERSION
make release # set today's date in VERSION
```

## Maintenance

See [how to contribute](https://github.com/dockette/.github/blob/master/CONTRIBUTING.md) to this package. Consider to [support](https://github.com/sponsors/f3l1x) **f3l1x**. Thank you for using this package.
See [how to contribute](https://github.com/dockette/.github/blob/master/CONTRIBUTING.md) to this package. Consider to
[support](https://github.com/sponsors/f3l1x) **f3l1x**. Thank you for using this package.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2026.10.23
VERSION=2026.10.23
Loading