Skip to content

Instantly share code, notes, and snippets.

@aranajhonny
Last active August 31, 2018 21:21
Show Gist options
  • Save aranajhonny/a3c2e333b1ba41a9b7bdace7cd58f6eb to your computer and use it in GitHub Desktop.
Save aranajhonny/a3c2e333b1ba41a9b7bdace7cd58f6eb to your computer and use it in GitHub Desktop.
Rails Dockerfile for Zeit.co/now - https://github.com/aranajhonny/now-rails-example
FROM ruby:2.3.3
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
RUN mkdir /app
WORKDIR /app
ADD Gemfile /app/Gemfile
ADD Gemfile.lock /app/Gemfile.lock
RUN bundle install
ADD . /app
EXPOSE 3000
CMD rails s -p 3000
@jjant
Copy link

jjant commented Nov 3, 2017

I don't understand: How do can I access my app after deploying it? I tried your example app, and I get a 502: Failed deployment error when I access the url.

@jjant
Copy link

jjant commented Nov 3, 2017

@aranajhonny I was able to access my app by changing the command to CMD rails s -b 0.0.0.0 -p 3000.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment