A rapid development environment using docker for convenience

Takeoff Rapid Development Toolkit

Takeoff is a toolkit for rapid development, allowing you to prototype web applications using it’s command line tool.

Installed via npm you can find a list of commands for creating and managing Takeoff environments. Environments are created based on Blueprints.

Install Takeoff

Installing takeoff is simple, via NPM.

npm install -g @takeoff/takeoff
takeoff init <myenv>
cd <myenv>
takeoff start # This starts the default environment container in `envs/default`

To see how this all works, it’s all explained below.

It starts with a blueprint

Blueprints are repositories with some batteries included applications and configurations for containers. Takeoff uses these to build a full working environment in minutes. A blueprint generally contains a backend component, a frontend, a database and an ingress server.

Currently Takeoff only ships with the default blueprint (but it’s relativly easy to create new ones!) called takeoff-blueprint-basic and it provides:

Disclaimer: If you build an app with this you wish you deploy, you are responsible for your own security.

Under the hood is uses docker and docker-compose to minimise the hassle out of setting up frontend, backend and database servers (support for minikube is coming soon).

The best part though is of course kept till last.

Using Docker volumes, the development files for the applications sit on your local computer file system, however the applications run within docker and hot reload on changes. This means you can switch between your code and browser in seconds and see the changes and not have to worry about manually compiling before seeing your changes. On the server side this is accomplished with nodemon and on the clientside with webpack using hot reloading, so in most cases you don’t need to refresh the browser at all.

If you ever get disconnected from your docker sessions afer starting them up, you can type takeoff start again and you will reconnect to see any log output.

Why Takeoff?

Takeoff is designed to cut out those first few crucial hours where you are setting up your project environment, such as babel and webpack configurations, user authentication or even just selecting a framework. It’s perfect for hackdays, rapid prototypes, teaching new coders by having a pre-configured environment in just 4 simple commands.

It cut out the scary/annoying bit and gets right to the fun bit!

System Dependencies

This software has some dependencies, and currently has only been fully tested on Linux using Docker Community Edition.

First install this, Once installed you will have the docker and docker-compose commands. You also need git and node >= 8.4.0.

Up and running

You should now have a server running at http://localhost. You can access the API via http://localhost/api.

After installing, you will this folder structure in your Takeoff environment

     |- blueprints/basic # The basic blueprint that Takeoff ships
     |- envs/default # The default environment installed
        |- env # Folders with the source code you can change
            |- api # This is the Hapi API Server
            |- app # This is the frontend app
            |- nginx # Nginx configuration
            |- db # Postgres DB config
        |- docker # This is where all the docker configurations are kept
            |- docker-compose.yml # The glue file for your services
            |- api # This is the Hapi API Server
            |- app # This is the frontend app
            |- nginx # Nginx configuration
            |- db # Postgres DB config

Blueprint Cache

When you install a new blueprint, it is cached in the blueprints folder; this way when you create a new environment below it uses your local copy. If you want to update a blueprint, for now go into the folder and type git pull origin master. A command will be coming for this soon.

Creating new environments

Unofficially there are two blueprints:

When you want to create a new environment you can type:

    takeoff new <environment>
    takeoff start <environment>

This will start up your new named environment using the basic blueprint. Make sure you have stopped any other environments running unless you have changed ingress port assignments.

There is also a Wordpress Blueprint, you can find out more about installing it via it’s documentation (it may currently be broken, and I want to make this into a more general PHP blueprint anyway).

Platform Support

Currently only Linux is fully tested and supported out the box, but support for other OS is coming (testers and contributors welcome!). There is a page for Windows Users to provide extra information in the quest to get it working.