GithubHelp home page GithubHelp logo

docker-prerender's Introduction

prerender docker image

This image aims to give an easy way to run a prerender server. It's ideal to be used in environments such as Amazon ECS or Docker Cloud.

Usage

Just add the container in your task / topology definition. Then link to it the front-end container, making the prerender middleware point at http://prerender-container-address:3000.

Minimal docker example (supposing the front-end is served by nodejs using the prerender-node middleware):

docker run -d --name prerender mondora/prerender
docker run -d --name frontend \
    --link prerender:prerender \
    -e PRERENDER_SERVICE_URL="http://prerender:3000/"
    mycomp/myapp

Configuration

The server can be configured via the following environment variables:

  • ALLOWED_DOMAINS: a comma-separated list of domains for which you want to allow requests. Requests for other domains will result in a 404. Example: mysite.com,www.mysite.com

  • BLACKLISTED_DOMAINS: a comma-separated list of domains for which you want to disallow requests. Requests for this domains will result in a 404. Example: yahoo.com,www.google.com. Note: this option is moot if ALLOWED_DOMAINS is specified

  • AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION, S3_BUCKET_NAME, S3_PREFIX_KEY: variables used to configure the s3HtmlCache prerender plugin. AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and S3_BUCKET_NAME are required, otherwise the inMemoryHtmlCache plugin will be used.

docker-prerender's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-prerender's Issues

Usage with nginx

Hello,

I am new to this and I would need a little help. I have an application written in angular2 and would need some kind of prerendering for facebook for example. I use cloud.docker.com and my app runs on nginx. Can I use this image and what do I have to do. Can you please help me.

Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.