1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-30 19:22:21 +00:00

Set up frontend on docker images

This commit is contained in:
2016-03-03 13:39:56 +00:00
parent 85f9346001
commit 089f0e3162
2 changed files with 11 additions and 1 deletions

View File

@@ -13,8 +13,13 @@ ADD Gemfile* /tmp/
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

View File

@@ -50,6 +50,10 @@ COPY Gemfile Gemfile
COPY Gemfile.lock Gemfile.lock
RUN bundle install --without test
#Cache node_modules
WORKDIR /tmp
COPY frontend/package.json package.json
RUN npm install
# Copy site into place.
RUN rm -rf /var/www
@@ -74,7 +78,8 @@ RUN echo PassengerMaxPoolSize 3 >> /etc/apache2/apache2.conf
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
# By default, simply start apache.
CMD /usr/sbin/apache2ctl -D FOREGROUND