From 4ae5e66b66673d1f16a70e5a5facc9183d979b30 Mon Sep 17 00:00:00 2001 From: Jacob Cody Wimer Date: Wed, 9 Mar 2016 09:09:18 -0500 Subject: [PATCH] Fixed dockerfiles for prod and dev with new frontend --- rails-dev-Dockerfile | 5 +---- rails-prod-Dockerfile | 5 +++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/rails-dev-Dockerfile b/rails-dev-Dockerfile index e34c624..f442e13 100644 --- a/rails-dev-Dockerfile +++ b/rails-dev-Dockerfile @@ -3,7 +3,7 @@ FROM ruby:2.3.0 RUN apt-get update RUN apt-get install -y build-essential -RUN apt-get install -y nodejs sqlite3 +RUN apt-get install -y nodejs-legacy nodejs sqlite3 npm ENV WRESTLINGDEV_SECRET_KEY_BASE 077cdbef5c2ccf22543fb17a67339f234306b7fa2e1e4463d851c444c10a5611829a2290b253da78339427f131571fac9a42c83d960b2d25ecc10a4a0a7ce1a2 ENV WRESTLINGDEV_DEVISE_SECRET_KEY 2f29d49db6704377ba263f7cb9db085b386bcb301c0cd501126a674686ab1a109754071165b08cd72af03cec4642a4dd04361c994462254dd5d85e9594e8b9aa @@ -14,12 +14,9 @@ WORKDIR /tmp RUN bundle install --without production RUN npm install -g lineman -ADD frontend/package.json /tmp/ -RUN npm install RUN mkdir /rails WORKDIR /rails -RUN cp -a /tmp/node_modules /rails/frontend/node_modules VOLUME ["/rails"] EXPOSE 3000 diff --git a/rails-prod-Dockerfile b/rails-prod-Dockerfile index 7570a87..db3326a 100644 --- a/rails-prod-Dockerfile +++ b/rails-prod-Dockerfile @@ -4,7 +4,7 @@ FROM ruby:2.3.0 RUN apt-get update RUN apt-get -y upgrade -RUN DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential libssl-dev libyaml-dev libreadline-dev openssl curl git-core zlib1g-dev bison libxml2-dev libxslt1-dev libcurl4-openssl-dev libsqlite3-dev sqlite3 wget apache2 apt-transport-https nodejs mysql-client postfix +RUN DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential libssl-dev libyaml-dev libreadline-dev openssl curl git-core zlib1g-dev bison libxml2-dev libxslt1-dev libcurl4-openssl-dev libsqlite3-dev sqlite3 wget apache2 apt-transport-https nodejs nodejs-legacy npm mysql-client postfix #New Relic #RUN echo deb http://apt.newrelic.com/debian/ newrelic non-free >> /etc/apt/sources.list.d/newrelic.list @@ -54,6 +54,7 @@ RUN bundle install --without test WORKDIR /tmp COPY frontend/package.json package.json RUN npm install +RUN npm install -g lineman # Copy site into place. RUN rm -rf /var/www @@ -79,7 +80,7 @@ RUN echo PassengerMinInstances 3 >> /etc/apache2/apache2.conf RUN echo PassengerPreStart *:443 >> /etc/apache2/apache2.conf #Copy node_modules to /var/www -RUN cp -a /tmp/node_modules /var/www/frontend/node_modules +RUN mv /tmp/node_modules /var/www/frontend/node_modules # By default, simply start apache. CMD /usr/sbin/apache2ctl -D FOREGROUND