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
merged 1 commit into from Sep 14, 2017
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.
+45 −21
Diff settings

Always

Just for now

@@ -1,24 +1,7 @@
# README

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
@@ -17,6 +17,8 @@
default: &default
adapter: postgresql
encoding: unicode
username: postgres
host: db
# For details on connection pooling, see Rails configuration guide
# http://guides.rubyonrails.org/configuring.html#database-pooling
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
@@ -0,0 +1,16 @@
FROM ruby:2.4.0

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

RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN curl -sL https://deb.nodesource.com/setup_7.x | 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
@@ -0,0 +1,23 @@
version: '2'
services:
db:
image: postgres:9.6.2
server:
build:
context: ../../
dockerfile: ./config/docker/Dockerfile
volumes:
- ../../:/rails_app
volumes_from:
- gems
ports:
- '3000:3000'
- '8080:8080'
depends_on:
- db
tty: true
stdin_open: true
gems:
image: busybox
volumes:
- /rails_app_gems
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.