Development installation
- Install docker
- Get docker-compose
- Clone repo
- Run "docker-compose build"
- Run "docker-compose up"
- Point your browser to http://localhost:3000
You do NOT need any local ruby installation. In development mode the code will be bind mounted and the database will be an sqlite3 file in db/. Code changes can be made locally with the IDE of your choice.
Running rails or rake commands
All required rails commands must be run inside of the running docker container.
- Run "docker ps" and get your container ID
- Run "docker exec -it $CONTAINER_ID bash"
- Run your rails commands like "rails generate scaffold ...."
There is one downside on Linux hosts! Files generated within the container will be owned by "root", causing issues when committing them.
Solution: run "./fix_filesystem.sh" on your local machine before committing.
Database migrations
Database changes via migrations will be automatically performed at each container start via "rake db:migrate". You can run the command directly from inside the container as well.