git clone https://github.com/PantherHackers/rails_site.git
.cd rails_site
).docker-compose build
to pull the images.docker-compose run rails bundle exec rake db:create db:migrate
and wait for the containers to build..env.example
into .env
. cp .env.example .env
..env
if you will be using any of the resources (e.g. the Github API).public_repo
permission..env
file under GITHUB_API_KEY
.docker-compose run rails bundle exec rake posts:import
docker-compose up
.docker-machine ip
. This will be the IP you will put in the address bar when you start the server.git clone https://github.com/PantherHackers/rails_site.git
.cd rails_site
..env.example
file into a new file named .env
with cp .env.example .env
. This will be needed for the next step.docker-compose run rails bundle exec rake db:create db:migrate
and wait for the containers to build..env
file in order to use any of the resources mentioned in the regular setup above, follow the instructions listed there.docker-compose up
and wait for the Docker images to start up.docker-machine ip
with your web browser. The server should then spin up and start serving the site.Gemfile
, make sure to rebuild the Docker container with docker-compose build
before running docker-compose up
again.rake
, rails
, or mysql
), you need to use docker-compose exec <container> <shell command>
, where <container>
can be rails
or db
depending on whether you want to access the Rails app or the MySQL database..bashrc
or .zshrc
file to help type container commands faster:
alias ddb='docker-compose exec db'
alias dr='docker-compose exec rails'
alias dbe='docker-compose exec rails bundle exec'
If you have any questions, the instructions in this document are not clear, or the setup does not work for you, feel free to contact Luis on Slack (@luis) or shoot him an email at luis@pantherhackers.com