diff --git a/Dockerfile b/Dockerfile index e7c9678..818e53b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 - @@ -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"] diff --git a/docker-compose.yml b/docker-compose.yml index 850970d..c4347c3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,10 +2,9 @@ version: "2" services: app: - image: wearefriday/spectre build: . ports: - - "3000:3000" + - "4000:4000" links: - db environment: @@ -13,11 +12,11 @@ services: - 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