1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-17 05:15:36 +00:00

Get frontend javascript into the docker image. Still need to figure out how to get frontend templates into rails.

This commit is contained in:
2016-05-14 11:20:28 -04:00
parent 3659597780
commit 225e90ca8f
4 changed files with 16 additions and 5 deletions

View File

@@ -110,4 +110,7 @@ Wrestling::Application.configure do
config.action_mailer.perform_deliveries = true config.action_mailer.perform_deliveries = true
#Devise needs origin of email #Devise needs origin of email
Rails.application.routes.default_url_options[:host] = 'https://wrestlingdev.com' Rails.application.routes.default_url_options[:host] = 'https://wrestlingdev.com'
#For lineman creating assets
config.serve_static_files = true
end end

View File

@@ -1,5 +1,6 @@
cd .. cd ..
bash rails-prod.sh wrestlingdev docker build -t wrestlingdev -f rails-prod-Dockerfile .
cd deploy cd deploy
docker-compose -f docker-compose-test.yml kill
docker-compose -f docker-compose-test.yml up -d docker-compose -f docker-compose-test.yml up -d
echo Make sure your local mysql database has a wrestlingtourney db echo Make sure your local mysql database has a wrestlingtourney db

View File

@@ -33,6 +33,10 @@ module.exports = function(lineman) {
} }
}, },
removeTasks: {
common: ["jshint"]
},
// Sass // Sass
// //
// Lineman supports Sass via grunt-contrib-sass, which requires you first // Lineman supports Sass via grunt-contrib-sass, which requires you first

View File

@@ -54,6 +54,7 @@ RUN bundle install --without test
WORKDIR /tmp WORKDIR /tmp
COPY frontend/package.json package.json COPY frontend/package.json package.json
RUN npm install RUN npm install
RUN npm install lineman
RUN npm install -g lineman RUN npm install -g lineman
# Copy site into place. # Copy site into place.
@@ -64,9 +65,13 @@ ENV WRESTLINGDEV_SECRET_KEY_BASE 077cdbef5c2ccf22543fb17a67339f234306b7fa2e1e446
ENV WRESTLINGDEV_DEVISE_SECRET_KEY 2f29d49db6704377ba263f7cb9db085b386bcb301c0cd501126a674686ab1a109754071165b08cd72af03cec4642a4dd04361c994462254dd5d85e9594e8b9aa ENV WRESTLINGDEV_DEVISE_SECRET_KEY 2f29d49db6704377ba263f7cb9db085b386bcb301c0cd501126a674686ab1a109754071165b08cd72af03cec4642a4dd04361c994462254dd5d85e9594e8b9aa
WORKDIR /var/www/ WORKDIR /var/www/
ADD . /var/www/ ADD . /var/www/
#Copy node_modules to /var/www
RUN mv /tmp/node_modules /var/www/frontend/node_modules
#RUN RAILS_ENV=production bundle exec rake db:migrate #RUN RAILS_ENV=production bundle exec rake db:migrate
RUN RAILS_ENV=production bundle exec rake assets:precompile RUN RAILS_ENV=production bundle exec rake assets:precompile
#RUN cp /var/www/frontend/dist/*.html /var/www/public/
# Update the default apache site with the config we created. # Update the default apache site with the config we created.
RUN rm /etc/apache2/sites-enabled/000-default.conf RUN rm /etc/apache2/sites-enabled/000-default.conf
@@ -79,8 +84,6 @@ RUN echo PassengerMaxPoolSize 3 >> /etc/apache2/apache2.conf
RUN echo PassengerMinInstances 3 >> /etc/apache2/apache2.conf RUN echo PassengerMinInstances 3 >> /etc/apache2/apache2.conf
RUN echo PassengerPreStart *:443 >> /etc/apache2/apache2.conf RUN echo PassengerPreStart *:443 >> /etc/apache2/apache2.conf
#Copy node_modules to /var/www
RUN mv /tmp/node_modules /var/www/frontend/node_modules
# By default, simply start apache. # By default, simply start apache.
CMD /usr/sbin/apache2ctl -D FOREGROUND CMD /usr/sbin/apache2ctl -D FOREGROUND