A Docker container which runs headless Chrome and renders web pages on the fly.
This project requires Node 7+ and Docker (installation instructions).
Install node dependencies using:
npm install
Install Chrome:
apt-get install google-chrome-beta
With a local instance of Chrome Beta installed, you can start the server locally:
npm start
To test a rendering, send a request:
http://localhost:3000/?url=https://dynamic-meta.appspot.com
After installing docker, build the docker image:
docker -t bot-render .
Start a container with the built image:
docker run --name bot-render-container bot-render
Send a request to the server running inside the container:
docker exec bot-render-container curl http://localhost:8080/?url=https://dynamic-meta.appspot.com
Stop the container:
docker kill bot-render-container
Clear containers:
docker rm -f $(docker ps -a -q)