Skip to content

Instantly share code, notes, and snippets.

@pawelkomarnicki
Last active June 15, 2018 13:10
Show Gist options
  • Save pawelkomarnicki/5a9d9e49c7cb5f0744d4ebc434e0babd to your computer and use it in GitHub Desktop.
Save pawelkomarnicki/5a9d9e49c7cb5f0744d4ebc434e0babd to your computer and use it in GitHub Desktop.
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
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
source 'https://rubygems.org'
gem 'rails', '5.2.0'
# Intentionally empty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment