Giter VIP home page Giter VIP logo

webflo-container's Introduction

Webflo Container

This is simply a node.js container with the @webqit/webflo framework installed. Once started, any webflo app can be deployed into the container from any git repository.

Usage

This container image lives on Docker Hub and can be pulled to a local machine or a remote Virtual Machine (VM) on any cloud platform.

To Use Locally

Ensure you have docker installed on your computer and run the following command from any location on your terminal:

docker pull webqit/webflo:latest

The above command pulls the webqit/webflo image to your local machine. (But this can be automatically done by docker on running any docker commands that reference the webqit/webflo image.)

Next is to use the following commands to start the container and the Webflo runtime. In each case, the first part of the command starts the container, while the second part (from webflo start) starts the application.

To Start

Start the container using docker run; map a port (e.g 80) of your host machine to 3000 of the container (unless changed webflo expects to run on port 3000); optionally, give your container a name; reference webqit/webflo as the image to use; and lastly, start webflo using webflo start.

docker run -d -p 80:3000 --name my-app webqit/webflo webflo start

Visit localhost to view your app.

To Start In Dev Mode

Webflo's dev mode is the perfect mode for developing locally. All you do is append the --dev flag to your webflo commands. (Learn more)

docker run -d -p 80:3000 --name my-app webqit/webflo webflo start --dev

In dev mode, webflo automatically restarts as you make changes to your codebase. Since webflo now lives inside a container, you'll need to bind the directory of your source code on your host machine to the /home/www/app directory of the container.

docker run -d -v /Users/me/my-app:/home/www/app -p 80:3000 --name my-app webqit/webflo webflo start --dev

To Use In the Cloud

TODO

To Deploy An App From Any Repo

Whether running locally or in the cloud, webflo can easily take your application from any git repo. This follows webflo's normal deploy command.

Simply point docker at your container (using docker exec [container-name]) and execute the webflo deploy command.

docker exec my-app webflo deploy https://github.com/me/my-app

If you will need to install any npm dependencies, you would run npm install on the appropriate directory in your container.

docker exec my-app npm install

If you will need to run additional webflo commands (e.g webflo restart to restart the application), you would follow the same pattern above.

docker exec my-app webflo restart

Extending this Build

TODO

webflo-container's People

Watchers

 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.