GithubHelp home page GithubHelp logo

isabella232 / gutenberg.run Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wordpress/gutenberg.run

0.0 0.0 0.0 888 KB

Gutenberg live branch preview provisioning service

Home Page: https://gutenberg.run/

License: MIT License

Shell 3.40% JavaScript 73.97% PHP 1.31% CSS 8.20% HTML 7.65% Dockerfile 5.48%

gutenberg.run's Introduction

Gutenberg Run

gutenberg.run is a service which provides temporary live preview sites for Gutenberg pull requests.

Installation

Docker (with Docker Compose) is the only requirement to run Gutenberg Run locally.

After cloning the repository, run docker-compose up in the cloned directory.

git clone https://github.com/aduth/gutenberg.run.git
cd gutenberg.run
docker-compose up

By default, Gutenberg Run assumes a development environment.

Since Gutenberg Run provisions new sites using randomized subdomains, you should configure wildcard DNS handling to develop locally.

If you're developing using macOS, dnsmasq is ideal for this. With Homebrew installed, you can follow guidance from this article, where the steps for this project should look something like:

brew install dnsmasq # Install dnsmasq
echo "address=/.gutenberg.run.test/127.0.0.1" >> /usr/local/etc/dnsmasq.conf # Configure dnsmasq to redirect gutenberg.run.test subdomains to localhost
sudo brew services start dnsmasq # Start dnsmasq process
sudo mkdir -p /etc/resolver # Create resolvers directory for macOS DNS query overrides
sudo sh -c 'echo "nameserver 127.0.0.1" > /etc/resolver/gutenberg.run.test' # Configure gutenberg.run.test DNS query behavior

Configuration

The following options exist, configured by the presence of environment variables.

  • NODE_ENV: Application running mode, one of development or production (default development)
  • BASE_HOSTNAME: The base hostname for containers (default gutenberg.run.test)
  • MYSQL_ROOT_PASSWORD: Password to use as root for the MySQL database (default password)
  • CONTAINER_TTL_SECONDS: Container lifetime, in seconds (default 86400)
  • SENTRY_DSN: Sentry data source name, when using Sentry for error logging

You can assign values to these by creating a .env file at the root of the project directory, or as a persistent user or system environment variable.

Updating

If you have followed the installation instructions using Git, you can pull the latest changes from the working directory:

git pull

Regardless whether there are containers actively running, you will likely need to rebuild the images. You can (re)start the containers with rebuild using the following command:

docker-compose up -d --build

If you know a specific image(s) to rebuild, simply append it to the previous command:

docker-compose up -d --build cleaner web

License

Copyright 2019 Andrew Duthie

Released under the MIT License.

gutenberg.run's People

Contributors

aduth avatar dependabot[bot] avatar iandunn 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.