Code Monkey home page Code Monkey logo

vvv-vip-go's Introduction

Getting up and running

Step 0: Read the docs

VVV2 Adding a New Site

Step 1: Add your site to vvv-custom.yml

Add a site block into vvv-custom.yml, like this:

  name-your-site-here: 
    repo: https://github.com/Automattic/vvv-vip-go.git
    branch: master
    hosts: 
     - name-your-site-here.test
    custom:
      vip-repo: [email protected]:wpcomvip/demo.git
      vip-branch: master
  • Subsitute name-your-site-here with the name of your site, this will be used for the directory and will be the basis of the database name
  • Add the HTTP hosts (domains) you need into the hosts array
  • You always want to leave the repo and branch values as they are above, because this is the provisioning script for VVV VIP Go
  • Add your VIP Go client repo into custom > vip-repo
  • Add the branch you want to use in your VIP Go client repo into custom > vip-branch

For comparison, you'll end up with something like this:

  vip-go-demo: 
    repo: https://github.com/Automattic/vvv-vip-go.git
    branch: master
    hosts: 
     - vip-go-demo.test
    custom:
      vip-repo: [email protected]:wpcomvip/demo.git
      vip-branch: master

Save your vvv-custom.yml

Step 2: Re-Provision your VVVV

vagrant provision

or, on a fresh install

vagrant up --provision

When finished, your VIP site will appear on the dashboard at http://vvv.test and at the hosts specified

vvv-vip-go's People

Contributors

chrean avatar simonwheatley avatar tomjn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

vvv-vip-go's Issues

Wrong variable substitution in vvv-init.sh

I think there is a problem with vvv-init.sh.

In nginx.conf template for custom site there is this line:

server_name {{VIP_DOMAINS_HERE}};

However, in vvv-init.sh the substitution is attempted on a different variable name:

sed -i "s#{{VIP_DOMAINS}}#${DOMAINS}#" "${VVV_PATH_TO_SITE}/provision/vvv-nginx.conf"

So my guess is, variable name should be changed in either file.

Note: I have tried to make the change into vvv-init-sh and it worked. I can submit the code if you want me to.

Create sites on Mutlisite

I wonder if multisite is enabled and another flag is set say multisite_create: true, if you define other domains in the VVV config, it should go away and create those sites for you.

See #4

Remove known hosts

Do we need to update this? A utility was added to VVV 2 named trusted-hosts that does the same thing

Extra smarts?

I wonder if we could have the provisioner check a live site or an API in order to figure out some of the config options in advance? Maybe then we could auto-generate copy paste for the config file in the Go client facing admin when that arrives?

Do not define VIP_GO_ENV

The init for the sites creates the constant of VIP_GO_ENV. It makes it a dev value, which is a neat idea, but it a breaking change. Much of mine and many other's code checks to see if VIP_GO_ENV is defined and does different logic. If this constant is in place on local, this could mean production code that is not designed to run in local code will run and may break local installs.

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.