Last active
September 9, 2017 04:45
-
-
Save tanaka51/2a43f31aae36a94f975c58eee28a3ef7 to your computer and use it in GitHub Desktop.
Revisions
-
tanaka51 revised this gist
Sep 9, 2017 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -12,4 +12,5 @@ services: - .:/opt/app ports: - 3000:3000 links: - mysql -
tanaka51 created this gist
Sep 9, 2017 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ FROM ruby:2.4.1-alpine ENV RAILS_ROOT /opt/app RUN mkdir -p $RAILS_ROOT WORKDIR $RAILS_ROOT RUN set -x \ && apk upgrade --no-cache \ && apk add --no-cache --virtual build-dependencies \ less \ tzdata \ build-base \ mysql-dev \ nodejs \ && apk add --no-cache \ libxml2-dev \ libxslt-dev \ && gem install --no-document nokogiri \ -- --use-system-libraries \ --with-xml2-config=/usr/bin/xml2-config \ --with-xslt-config=/usr/bin/xslt-config \ && gem install --no-document bundler rails COPY . $RAILS_ROOT RUN bundle install CMD ["./bin/rails", "server", "-b", "0.0.0.0"] 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ version: '3' services: mysql: image: mysql:5.7.19 environment: MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' rails: build: . environment: DATABASE_HOST: mysql volumes: - .:/opt/app ports: - 3000:3000