Giter VIP home page Giter VIP logo

runverter-server's Introduction

runverter-server

Welcome to the server backend of Runverter. For more information about this project please check out the detailed blog post.

The whole application runs in separated docker containers, which will be maintained in this repository and published as images on Docker Hub.

architecture

All incoming web requests are loadbalanced by haproxy and spreaded to the underlying node containers.

The node applications connect to a redis instance to get the current index page.

Assets of the applications are hosted via amazon S3 CDN.

Please read the files in the server-configuration folder, to match the server requirements.

setting up the server

  • SSH into a server.
  • Make sure docker is installed.

create a shared network

$ docker network create runverter

start redis

Pull Redis image from docker and run container.

$ docker pull redis
$ docker run -d --name runverter-redis --net runverter -p 127.0.0.1:6379:6379 redis redis-server --appendonly yes

This container will expose the port 6379 and its ip will become available in the shared network via the hostname runverter-redis. This is required to let the node applications access Redis.

start node application(s)

Pull runverter-webserver and start 6 container instances.

$ docker pull stefankracht/runverter-webserver
$ docker run -d --name runverter-app-1 --net runverter -v ~/runverter:/usr/src/app/runverter --env PRERENDER_TOKEN=$PRERENDER_TOKEN stefankracht/runverter-webserver && docker run -d --name runverter-app-2 --net runverter -v ~/runverter:/usr/src/app/runverter --env PRERENDER_TOKEN=$PRERENDER_TOKEN stefankracht/runverter-webserver && docker run -d --name runverter-app-3 --net runverter -v ~/runverter:/usr/src/app/runverter --env PRERENDER_TOKEN=$PRERENDER_TOKEN stefankracht/runverter-webserver && docker run -d --name runverter-app-4 --net runverter -v ~/runverter:/usr/src/app/runverter --env PRERENDER_TOKEN=$PRERENDER_TOKEN stefankracht/runverter-webserver && docker run -d --name runverter-app-5 --net runverter -v ~/runverter:/usr/src/app/runverter --env PRERENDER_TOKEN=$PRERENDER_TOKEN stefankracht/runverter-webserver && docker run -d --name runverter-app-6 --net runverter -v ~/runverter:/usr/src/app/runverter --env PRERENDER_TOKEN=$PRERENDER_TOKEN stefankracht/runverter-webserver

For more detailed description, please read the docker/runverter-webserver/README.md.

start haproxy

Pull runverter-haproxy and start container.

$ docker pull stefankracht/runverter-haproxy
$ docker run -d --name runverter-haproxy --net runverter -v /etc/haproxy/certs/:/etc/haproxy/certs/ -p 80:80 -p 443:443 -p 127.0.0.1:8080:8080 --env PRERENDER_TOKEN=$PRERENDER_TOKEN stefankracht/runverter-haproxy

For more detailed description, please read the docker/runverter-haproxy/README.md.

runverter-server's People

Contributors

krachtstefan avatar

Watchers

 avatar  avatar

Forkers

cl0nebot

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.