Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add docker configuration #1

merged 1 commit into from
Sep 14, 2017
Show file tree
Hide file tree
Changes from all commits
File filter

Filter by extension

Filter by extension

Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 4 additions & 21 deletions
Original file line number Diff line number Diff line change
@@ -1,24 +1,7 @@

This README would normally document whatever steps are necessary to get the
application up and running.
Project was crated to show how to configure rails 5.1.x application. It will be as simple as it could. I want to everybody could easy inspired this repo to create own app.
I started by

Things you may want to cover:
`rails new rails-5-1-configuration --webpack --database=postgresql` and commit it as initial commit

* Ruby version

* System dependencies

* Configuration

* Database creation

* Database initialization

* How to run the test suite

* Services (job queues, cache servers, search engines, etc.)

* Deployment instructions

* ...
then every feature I add will be created as pull request with description what is going on
2 changes: 2 additions & 0 deletions config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
default: &default
adapter: postgresql
encoding: unicode
username: postgres
host: db
# For details on connection pooling, see Rails configuration guide
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
Expand Down
16 changes: 16 additions & 0 deletions config/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM ruby:2.4.0

RUN apt-get update -qq
RUN apt-get install apt-transport-https

RUN curl -sS | apt-key add -
RUN echo "deb stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN curl -sL | bash -
RUN apt-get update -qq

RUN apt-get install -y build-essential libpq-dev yarn nodejs

WORKDIR /rails_app

ENV BUNDLE_PATH=/rails_app_gems
ENV RAILS_ENV=development
23 changes: 23 additions & 0 deletions config/docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: '2'
image: postgres:9.6.2
context: ../../
dockerfile: ./config/docker/Dockerfile
- ../../:/rails_app
- gems
- '3000:3000'
- '8080:8080'
- db
tty: true
stdin_open: true
image: busybox
- /rails_app_gems