Code Monkey home page Code Monkey logo

rails_site's Introduction

PantherHackers

Same site. RoR back-end

Setup

  • Install Docker from Docker's website.
  • Clone this repo from your terminal with git clone https://github.com/PantherHackers/rails_site.git.
  • Go to project (cd rails_site).
  • Run docker-compose run rails bundle exec rake db:create db:migrate and wait for the containers to build.
  • Copy .env.example into .env. cp .env.example .env.
  • Fill in the appropriate values in .env if you will be using any of the resources (e.g. the Github API).
  • If you want to populate the blog posts:
    • Create your own Github API key with the public_repo permission.
    • Add the token to the .env file under GITHUB_API_KEY.
    • Run docker-compose run bundle exec rake posts:import
  • Run docker-compose up.
  • Wait for the Docker images to start up.
  • Go to localhost:3000.

Need to know

  • If you change the Gemfile, make sure to rebuild the Docker container with docker-compose build before running docker-compose up again.
  • To run commands within a container (to use 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.

Pro-Tips

  • In Unix systems, you can setup aliases in your .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'

Notes

  • Feel free to play with the project, modify files, and refresh the website to see changes.
  • If unfamiliar with Rails, check out their getting started guide.

Contact

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 [email protected]

rails_site's People

Contributors

ferrerluis avatar macdonny avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.