Skip to content

Instantly share code, notes, and snippets.

@infinityhacks
Forked from Rudis1261/Dockerfile
Created September 16, 2018 08:58
Show Gist options
  • Select an option

  • Save infinityhacks/01303e8f75969291b41c5cc234f5148a to your computer and use it in GitHub Desktop.

Select an option

Save infinityhacks/01303e8f75969291b41c5cc234f5148a to your computer and use it in GitHub Desktop.

Revisions

  1. @Drpain Drpain revised this gist Dec 10, 2016. 2 changed files with 4 additions and 4 deletions.
    5 changes: 2 additions & 3 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,8 @@
    FROM ruby:2.3.3
    FROM ruby:2.3.1
    RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
    RUN apt-get install -y imagemagick
    RUN mkdir /usr/local/rails-app
    WORKDIR /usr/local/rails-app
    ADD Gemfile Gemfile
    ADD Gemfile.lock Gemfile.lock
    RUN bundle install

    # docker build -t rails-app .
    3 changes: 2 additions & 1 deletion docker-composer.yml
    Original file line number Diff line number Diff line change
    @@ -10,9 +10,10 @@ services:
    - "3306:3306"
    web:
    build: .
    command: bundle exec rails s -p 3000 -b '0.0.0.0'
    command: bundle exec rails s -e rudi -p 3000 -b '0.0.0.0'
    volumes:
    - .:/usr/local/rails-app
    working_dir: /usr/local/rails-app
    ports:
    - "3000:3000"
    depends_on:
  2. @Drpain Drpain revised this gist Dec 10, 2016. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion Gemfile
    Original file line number Diff line number Diff line change
    @@ -1,2 +1,3 @@
    source 'https://rubygems.org'
    gem 'rails', '5.0.0.1'
    gem 'rails', '4.2.7.1'
    gem 'mysql2', '~> 0.3.18'
  3. @Drpain Drpain revised this gist Dec 10, 2016. 1 changed file with 12 additions and 0 deletions.
    12 changes: 12 additions & 0 deletions database.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    default: &default
    adapter: mysql2
    encoding: utf8
    pool: 5
    username: root
    password: root
    post: 3306
    host: mysql

    development:
    <<: *default
    database: rails-app_development
  4. @Drpain Drpain revised this gist Dec 10, 2016. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions Gemfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    source 'https://rubygems.org'
    gem 'rails', '5.0.0.1'
  5. @Drpain Drpain revised this gist Dec 10, 2016. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion docker-composer.yml
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,13 @@
    version: '1'
    version: '2'
    services:
    mysql:
    image: mariadb
    volumes:
    - ~/Projects/database_data:/var/lib/mysql
    environment:
    - MYSQL_ROOT_PASSWORD=root
    ports:
    - "3306:3306"
    web:
    build: .
    command: bundle exec rails s -p 3000 -b '0.0.0.0'
  6. @Drpain Drpain created this gist Dec 10, 2016.
    9 changes: 9 additions & 0 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    FROM ruby:2.3.3
    RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
    RUN mkdir /usr/local/rails-app
    WORKDIR /usr/local/rails-app
    ADD Gemfile Gemfile
    ADD Gemfile.lock Gemfile.lock
    RUN bundle install

    # docker build -t rails-app .
    13 changes: 13 additions & 0 deletions docker-composer.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    version: '1'
    services:
    mysql:
    image: mariadb
    web:
    build: .
    command: bundle exec rails s -p 3000 -b '0.0.0.0'
    volumes:
    - .:/usr/local/rails-app
    ports:
    - "3000:3000"
    depends_on:
    - mysql