Code Monkey home page Code Monkey logo

mobywebsite's Introduction

Moby website

Website for the moby project.

The Moby website is built using Jekyll and published to Github pages.

Developing locally

In order to build and test locally, run this command in the docs directory:

$ docker run -ti -v "$PWD":/usr/src/app -p "4000:4000" starefossen/github-pages

Then browser to localhost:4000 to see the rendered site. The site autorefreshes when you modify files locally.

If you want to test blog posts with a data in the future, use the following command instead.

$ docker run -ti -v "$PWD":/usr/src/app -p "4000:4000" starefossen/github-pages jekyll serve -d /_site --watch --force_polling -H 0.0.0.0 -P 4000 --future true

GitHub API rate limits

This site uses the GitHub API to dynamically fetch project and users profiles. If you start seeing GitHub rate limit messages in the logs such as API rate limit exceeded, you need to create a GitHub Oauth application for yourself and set the GITHUB_CLIENT_SECRET and GITHUB_CLIENT_SECRET environment variables with the values for that application for your container. This bumps up the rate limit from 60 to 5000 per whatever time period they are using.

$ docker run -ti -v "$PWD":/usr/src/app -p "4000:4000" -e "GITHUB_CLIENT_ID=xxx" -e "GITHUB_CLIENT_SECRET=yyy" starefossen/github-pages

Staging

When you push to this repository on the theme-start branch, it triggers an autobuild of the docker/mobywebsite private image, which is autodeployed to a password protected staging website at https://mobyweb.docker.team/. This is for Docker design team to test big redesigns without changing production. Docker employees can use their docker.com account login to access it.

Production

The Moby project website container image is built automatically with a private image, docker/mobywebsite:latest. Any push or PR mergin to the master branch triggers an autobuild.

The autobuild uses Docker Hub hooks: a pre_build hook script uses the starefossen/github-pages image to generate the html from markdown, then the project's Dockerfile is used to build the image, adding that generated content to an Nginx image, with some Nginx config.

A Docker stack managed in Docker Cloud is autoredeployed everytime this image changes, to http://web.mobywebsite-prod.8d7e1615.svc.dockerapp.io/.

DNS is managed using Amazon Route53. The backend website is fronted by an Amazon CloudFront distribution that does caching and SSL termination. When a new version of the image is built, a post_push hook invalidates the cloudfront cache for the distribution.

For design or content issues with this website, please log an issue in this repo. For production issues please ping [email protected].

mobywebsite's People

Contributors

chanezon avatar jsouth avatar amirmc avatar akihirosuda avatar riyazdf avatar tiborvass avatar brettcannon avatar crosbymichael avatar radu-matei avatar thajeztah avatar vieux avatar

Watchers

James Cloos avatar  avatar

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.