Code Monkey home page Code Monkey logo

laraveldocker's Introduction

laraveldocker (Lightning Fast)

deploy on push

This is a proof of concept application which uses fig to set up a quick easy deploy on git push with the flexibility of using arbitrary docker containers, and how quickly a local development environment (even with non-trivial dependencies such as beanstalkd) can be bootstrapped which is very similar to production.

To set up:

Locally

  1. Make sure fig and docker are installed.
  2. Run fig up in the top level directory to view the app. The app will automatically run migrations, seed the database etc. on container start.
  3. Visit localhost:8000 (or boot2docker:8000) in your browser.

Deploy

  1. Spin up a new VPS, user, etc.
  2. Install fig and docker.
  3. Run the following commands on the server:
$ cd
$ mkdir laraveldocker
$ mkdir laraveldocker_deploy
$ cd laraveldocker
$ git init --bare
$ wget https://raw.githubusercontent.com/nathanleclaire/laraveldocker/master/hooks/post-receive -O hooks/post-receive
$ chmod +x hooks/post-receive
  1. Great, now you just have to run some commands on the client (your laptop etc.) to set up deploy-on-push. First, clone the repo and add the new server as a remote:
$ git clone https://github.com/nathanleclaire/laraveldocker
$ cd laraveldocker
$ git remote add prod user@vpsIpAddress:laraveldocker
$ git push prod master

The first time this push runs, it will take some time, as the VPS needs to download and build the dependencies it needs to run the application. On subsequent pushes everything will go much faster.

That's it! Now you should be able to go to vpsIpAddress and see the application running.

app

laraveldocker's People

Watchers

Rico Moorman 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.