Last active
August 25, 2016 00:31
-
-
Save keiththomps/d2a921ad96da120551d79a868533f641 to your computer and use it in GitHub Desktop.
Script to ensure database is set up and run rails server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ruby:2.3 | |
| RUN apt-get update -yqq \ | |
| && apt-get install -yqq --no-install-recommends \ | |
| postgresql-client \ | |
| && rm -rf /var/lib/apt/lists | |
| WORKDIR /usr/src/app | |
| COPY Gemfile* ./ | |
| RUN bundle install | |
| COPY . . | |
| EXPOSE 3000 | |
| CMD bin/start |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # put this file in the bin directory of the rails app and make it executable with `chmod +x bin/start` | |
| bin/rake db:create db:migrate | |
| bin/rails server -b 0.0.0.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment