diff --git a/Dockerfile b/Dockerfile index 1cbe6df..fa08392 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,12 @@ WORKDIR /app/BikeBike RUN bundle install -RUN mkdir -p public/stylesheets/application -p public/stylesheets/web-fonts && tar xvfz bumbleberry-application.tar.gz -C public/stylesheets/application && tar xvfz bumbleberry-web-fonts.tar.gz -C public/stylesheets/web-fonts && tar xvfz bumbleberry-admin.tar.gz -C public/stylesheets/admin +RUN mkdir -p public/stylesheets/application \ + -p public/stylesheets/web-fonts \ + -p public/stylesheets/admin \ + && tar xvfz bumbleberry-application.tar.gz -C public/stylesheets/application \ + && tar xvfz bumbleberry-web-fonts.tar.gz -C public/stylesheets/web-fonts \ + && tar xvfz bumbleberry-admin.tar.gz -C public/stylesheets/admin # Add a script to be executed every time the container starts. COPY entrypoint.sh /usr/bin/ diff --git a/README.md b/README.md index bc2de03..4a2325a 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ | Environment | Build Status | | ----------- |:------------:| | Development | [![Development Build Status](https://travis-ci.org/bikebike/BikeBike.svg?branch=development)](https://travis-ci.org/bikebike/BikeBike) | -| Production | [![Production Build Status](https://travis-ci.org/bikebike/BikeBike.svg?branch=master)](https://travis-ci.org/bikebike/BikeBike) | +| Production | It works with this Fork! | ## About this Fork @@ -13,6 +13,37 @@ This repository creates a test environment so that we can test/fix issues before Instructions can be found in docker-compose.yml, and docker-compose.build. +You may easily switch between the production and development environment. One good reason for doing this is that some system administration tasks are handled differently in production. For instance, mail is delayed in production. + +Realize you can always do things in the containe: + + `docker-compose exec bikebike /bin/bash` + +### From production to development + + ``` + rake assets:clobber + rake assets:precompile + ``` +### From development to production + + ``` + rake assets:clobber + rake assets:precompile + docker-compose restart bikebike + ``` +### About that letsencrypt network in docker-compose.yml + +I'll probably eventually come out with a github example of the docker-compose.yml file I utilize. This network provides a nginx proxy and an automatic generation of letsencrypt certificates. However, there are good directions at [ACME Companion](https://github.com/nginx-proxy/acme-companion) . + +In the `bike_bike_advanced_environment` file I utilize these ENV variables: + + ``` + VIRTUAL_HOST + LETSENCRYPT_HOST + LETSENCRYPT_EMAIL + VIRTUAL_PORT + ``` ## From bikebike/bikebike diff --git a/bumbleberry-admin.tar.gz b/bumbleberry-admin.tar.gz index 5ad6037..286b8f2 100644 --- a/bumbleberry-admin.tar.gz +++ b/bumbleberry-admin.tar.gz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f459e4779ff1508eb14997481164942cb91f31dc58823bf3d0711ae4487208fc -size 2441820 +oid sha256:096d67026a2d0dee5003ce5810e710807dde5561364ea7d5747b5bf9019d0efd +size 5434864 diff --git a/bumbleberry-application.tar.gz b/bumbleberry-application.tar.gz index ae346c9..ebb0e2c 100644 --- a/bumbleberry-application.tar.gz +++ b/bumbleberry-application.tar.gz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6df4e15248450c1bdfe39efc891a038886344f60557ab6467651d3d0b63adc42 -size 6352360 +oid sha256:12854f51a10f8c96254fd62aacd6a8d93ddb62783ffff931447c42d617731354 +size 13989184 diff --git a/bumbleberry-web-fonts.tar.gz b/bumbleberry-web-fonts.tar.gz index f9fd64a..0deeff9 100644 --- a/bumbleberry-web-fonts.tar.gz +++ b/bumbleberry-web-fonts.tar.gz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:78fdbd7839bd718cc5e9edcdd3d9a0216d9961ca0774ff20c57463e5d72e6c78 -size 47485755 +oid sha256:85bd24cfd8628601247494a741fa4fa6bc3b906a7799722ac0f88b640386452a +size 96265649 diff --git a/config/environments/development.rb b/config/environments/development.rb index 1c74b76..20ca12a 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -1,4 +1,7 @@ BikeBike::Application.configure do + + config.app_config = config_for(:app_config) + # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded on @@ -26,19 +29,47 @@ BikeBike::Application.configure do # This option may cause significant delays in view rendering with a large # number of complex assets. config.assets.debug = true - config.assets.digest = true + config.assets.digest = true config.assets.compile = true - config.assets.precompile += %w(*.png *.jpg *.jpeg *.gif *.json *.ttf *.otf *.woff *.woff2 *.svg *.json) + + config.assets.unknown_asset_fallback = false + config.assets.precompile = ["manifest.js"] + config.assets.check_precompiled_asset = false + + # Version of your assets, change this if you want to expire all your assets. + config.assets.version = '1.01' + + config.serve_static_files = true # to deliver to the browser instead of email - config.action_mailer.delivery_method = :letter_opener + #config.action_mailer.delivery_method = :letter_opener + #config.action_mailer.raise_delivery_errors = true + #config.action_mailer.perform_deliveries = true + + # SMTP real-world test + config.action_mailer.delivery_method = :smtp + config.action_mailer.smtp_settings = { + address: config.app_config['smtp_address'], + domain: config.app_config['smtp_domain'], + port: config.app_config['smtp_port'], + ssl: config.app_config['smtp_ssl'], + authentication: :plain, + enable_starttls_auto: true, + openssl_verify_mode: 'none', + user_name: config.app_config['smtp_user_name'], + password: config.app_config['smtp_password'] + } config.action_mailer.raise_delivery_errors = true config.action_mailer.perform_deliveries = true - config.serve_static_files = true - I18n.config.language_detection_method = I18n::Config::DETECT_LANGUAGE_FROM_URL_PARAM + # Enable locale fallbacks for I18n (makes lookups for any locale fall back to + # the I18n.default_locale when a translation can not be found). + config.i18n.fallbacks = true + I18n.config.language_detection_method = I18n::Config::DETECT_LANGUAGE_FROM_SUBDOMAIN + config.action_controller.default_url_options = { host: config.app_config['default_url'], trailing_slash: true } + Sidekiq::Extensions.enable_delay! - Paypal.sandbox! - config.action_controller.default_url_options = { trailing_slash: true } + #Paypal.sandbox! + #config.action_controller.default_url_options = { trailing_slash: true } end