Last active
June 15, 2018 13:10
-
-
Save pawelkomarnicki/5a9d9e49c7cb5f0744d4ebc434e0babd to your computer and use it in GitHub Desktop.
Starter to use with https://docs.docker.com/compose/rails/
This file contains 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: | |
postgres: | |
image: postgres:10.3 | |
volumes: | |
- ./tmp/db:/var/lib/postgresql/data | |
memcached: | |
image: memcached | |
web: | |
stdin_open: true | |
tty: true | |
build: . | |
command: bundle exec rails s -p 3000 -b '0.0.0.0' | |
volumes: | |
- .:/myapp | |
ports: | |
- "80:3000" | |
depends_on: | |
- postgres | |
- memcached |
This file contains 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 | |
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs | |
RUN mkdir /myapp | |
WORKDIR /myapp | |
COPY Gemfile /myapp/Gemfile | |
COPY Gemfile.lock /myapp/Gemfile.lock | |
RUN bundle install | |
COPY . /myapp |
This file contains 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
source 'https://rubygems.org' | |
gem 'rails', '5.2.0' |
This file contains 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
# Intentionally empty |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment