brew install postgresql
or download Postgres.app
- Install Postgres, needed for bundlinggit clone https://github.com/coderie/coderie-site.git
- Copy the repository down locallygem install bundler
- Installs Bundlerbundle install
- Bundles up all dependencies, this may take a whilebundle exec rake db:setup
- Setup the databasebundle exec rake db:seed
- Seed with starter databundle exec rails s
- Serve the applicationbundle exec rake db:reset
- If you want to reset and re-seed your dbdocker-compose build
docker-compose up
docker-compose run web rake db:create
docker-compose run web rake db:migrate
docker-compose run web rake
Rails is now inside of the container so commands will look like:
docker-compose run web rails generate scaffold post
Dependencies are also built into the container. This means that the container
could ship off to production (doesn't have to) in it's state and have the exact
dependencies shipped with it. This creates a bit more work though. Instead of
just bundle install
after gem changes, you will need to run the following:
docker-compose build