Created
November 9, 2018 23:21
-
-
Save wayanjimmy/19fcb93caa79a4fe46a3aedf1fddc3e8 to your computer and use it in GitHub Desktop.
Rails 5.2.1 + Ruby 2.5.3
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
version: "3" | |
services: | |
web: | |
build: . | |
ports: | |
- "3000:3000" | |
depends_on: | |
- db | |
environment: | |
RAILS_ENV: development | |
DATABASE_URL: postgres://postgres:secret@db:5432/grobat_development | |
YARN_INTEGRITY_ENABLED: "false" | |
volumes: | |
- .:/usr/src/app | |
command: bundle exec rails s -b 0.0.0.0 -p 3000 | |
db: | |
image: postgres:10.5-alpine | |
ports: | |
- "5432:5432" | |
volumes: | |
- dbdata:/var/lib/postgresql/data | |
environment: | |
POSTGRES_PASSWORD: secret | |
POSTGRES_DB: grobat_development | |
adminer: | |
image: adminer | |
restart: always | |
ports: | |
- "8080:8080" | |
environment: | |
ADMINER_PLUGINS: "dump-json" | |
volumes: | |
dbdata: |
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.5.3 | |
# Make nodejs and yarn as dependencies | |
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - | |
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash | |
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list | |
# Install dependencies and perform clean-up | |
RUN apt-get update -qq && apt-get install -y \ | |
build-essential \ | |
nodejs \ | |
yarn \ | |
&& apt-get -q clean \ | |
&& rm -rf /var/lib/apt/lists | |
WORKDIR /usr/src/app | |
ENV RAILS_ENV development | |
# Installing Ruby dependencies | |
COPY Gemfile* ./ | |
RUN gem install bundler | |
RUN bundle install --jobs 20 --retry 5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment