Docker development with Fig.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
bin
config
db
lib
log
public
spec
vendor/assets
.gitignore
.rspec
Dockerfile
Gemfile
Gemfile.lock
README.md
Rakefile
config.ru
fig.example.yml

README.md

Fig Demo

Docker development with Fig. Full blog post at http://chance.io/docker-development-with-fig.

Setup

To run locally, you'll need to install boot2docker and Fig. After installation, run the following commands:

git clone git@github.com:chancefeick/fig_demo.git
cd fig_demo

Configuration

For the services to work together, you'll need to configure a few files in your project. Run the following commands:

cp fig.example.yml fig.yml
cp config/database.example.yml config/database.yml
cp config/redis.example.yml config/redis.yml

Building services

After configuration, run the following commands:

fig build
fig run web rake db:create db:migrate

Running specs

To ensure your environment is setup correctly, run the specs:

fig run web bundle exec rspec

Running services

After the tests pass, run the following command:

fig up

The app should now be running on port 3000. To view your Docker daemon, run the following command:

boot2docker ip

After obtaining the IP address, visit XXX.XXX.XX.XXX:3000 in your browser.

That's it. You've successfully built a modern web stack using Docker and Fig.