figure
figure copied to clipboard
Fig powered mini-Heroku
Figure
Fig powered mini-Heroku. Inspired by Dokku.
What is it?
This project started as a fork of Dokku. It can host any application that can be run by fig up
by Fig locally.
Demo
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 infig.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 athttp://<app-name>.<your-server-address>
.
Installation
The current version of Figure only supports Ubuntu. To install it on your server:
- Install
make
,git
andruby
. - If you want to run this on AWS, follow the instruction here to enable AUFS.
- Clone the repo by
git clone https://github.com/project-nsmg/figure
. - Run
make install
as root. - Run
cat ~/.ssh/id_rsa.pub | ssh {YOUR_SERVER_IP} "sudo sshcommand acl-add figure $USER"
in your local server to upload your public key. - Add
figure ALL=(ALL) NOPASSWD:ALL
to sudoer file. - Change content in
/home/figure/VHOST
to the domain you want to serve.
That's it!
Figure Commands
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.
Is It Suitable For Production?
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.
License
MIT