Giter VIP home page Giter VIP logo

stocks-in-the-future's Introduction

README

This README would normally document whatever steps are necessary to get the application up and running.

Things you may want to cover:

  • Ruby version

  • System dependencies

  • Configuration

Running in docker

We have a docker-compose file set up to allow smoother local development. The compose structure includes services needed for running the stocks app locally, with preconfigured connections.

At present, these services are: postgres, redis, and the rails application.

To start the application, run docker compose up. Adding -d will free your terminal after the service boots. After the application starts, the site can be accessed at http://localhost:3000.

To set up the database the first time run, docker compose run --rm stocks bin/rails db:setup

The docker entrypoint takes care of installing updated gems, and running any pending database migrations before starting the rails application. Any gem or configuration changes can be applied by restarting the application server: docker compose restart stocks

Running rails commands

To run rails commands, such as rails generate ..., it is easiest to step into a console:

$ docker compose run --rm stocks bin/rails generate ....

If a console is needed for multiple commands, you can launch a shell in a running the container:

$ docker compose run --rm stocks bash
[+] Running 2/0
 ⠿ Container stocks-in-the-future-db-1     Running                                                  0.0s
 ⠿ Container stocks-in-the-future-redis-1  Running                                                  0.0s
The Gemfile's dependencies are satisfied
root@cea35fe15a85:/rails#

Running tests

To run RSpec tests in the container:

docker compose run --rm stocks rspec

Or a specific file/directory may be specified to narrow the scope:

docker compose run --rm stocks rspec spec/features

stocks-in-the-future's People

Contributors

garettarrowood avatar naomiyocum avatar jasonodoom avatar kristenking avatar randallreedjr avatar cflipse avatar lizprescott avatar dyeje avatar suttondemlong 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.