Skip to content

Commit

Permalink
modify Docker to run app in port 4000
Browse files Browse the repository at this point in the history
  • Loading branch information
jchuerva authored and Grant Slater committed Apr 29, 2019
1 parent 046db2a commit 8cdb84c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:2.3
FROM ruby:2.5.3

WORKDIR /opt
RUN curl -Ls https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 | tar -jxf -
Expand All @@ -8,8 +8,9 @@ RUN ln -s /opt/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/
WORKDIR /app
ADD Gemfile* /app/
RUN gem install bundler && bundle config build.nokogiri --use-system-libraries && bundle install --quiet --jobs 16 --retry 5 --without test
RUN bundle install

ADD . /app

EXPOSE 3000
CMD ["rails", "server", "-b", "0.0.0.0"]
EXPOSE 4000
CMD ["script/server"]
7 changes: 3 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,21 @@ version: "2"

services:
app:
image: wearefriday/spectre
build: .
ports:
- "3000:3000"
- "4000:4000"
links:
- db
environment:
- RAILS_ENV=production
- RAILS_SERVE_STATIC_FILES=true
- DATABASE_URL=postgresql://postgres@db/spectre
- DOMAIN_NAME=app
- PORT=:3000
- PORT=:4000
- PROTOCOL=http://
volumes:
- .:/app
command: bash -c "rm -f /app/tmp/pids/*.pid && rake assets:precompile && SECRET_KEY_BASE=`rake secret` rails server -b 0.0.0.0"
command: bash -c "rm -f /app/tmp/pids/*.pid && rake assets:precompile && SECRET_KEY_BASE=`rake secret` rails server -p 4000"

db:
image: postgres:9.6
Expand Down

0 comments on commit 8cdb84c

Please sign in to comment.