Fig powered mini-Heroku
Fig powered mini-Heroku. Inspired by Dokku.
This project started as a fork of Dokku. It can host any application that can be run by fig up
by Fig locally.
This demo shows how easy it is to deploy the Let's Chat program. It's applicable to any program that supports Fig.
Follow the Installation guide to fire up a Figure server, or run vagrant up
(with Vagrant installed) for a local development server.
Clone the Let's Chat repo git clone https://github.com/sdelements/lets-chat
.
Figure requires a service named web
defined in fig.yml
. So you need to change the fig.yml slightly. Also, you can create a volume for mongo to keep the data. The final fig.yml may look as follows:
# Let's Chat application
web:
build: .
links:
- db:db
ports:
- 5000:5000
# Mongo Database
db:
image: mongo:latest
volumes:
- .docker/db:/data/db
Commit the fig.yml file. Add Figure server for pushing.
git add fig.yml
git commit -m "adopt for figure deployment"
git remote add figure figure@<your-server-address>:<app-name>
Run git push
. The application will be live at http://<app-name>.<your-server-address>
.
The current version of Figure only supports Ubuntu. To install it on your server:
make
, git
and ruby
.git clone https://github.com/project-nsmg/figure
.make install
as root.cat ~/.ssh/id_rsa.pub | ssh {YOUR_SERVER_IP} "sudo sshcommand acl-add figure $USER"
in your local server to upload your public key.figure ALL=(ALL) NOPASSWD:ALL
to sudoer file./home/figure/VHOST
to the domain you want to serve.That's it!
Following the same design principle of Dokku, you need to run figure commands through ssh, like ssh figure@your-server-address <your-command>
. Run ssh figure@your-server-address help
for all available commands.
Figure is powering http://ns.mg and http://snapviva.com, but it is still in a very early stage. Many functions may not work as expected.
MIT