Browse Source

Adds development mode, improves the assets, updates the README with helpful information!

Jonathan Rosenbaum 3 years ago
parent
commit
c95e624de9
  1. 7
      Dockerfile
  2. 33
      README.md
  3. BIN
      bumbleberry-admin.tar.gz
  4. BIN
      bumbleberry-application.tar.gz
  5. BIN
      bumbleberry-web-fonts.tar.gz
  6. 45
      config/environments/development.rb

7
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/

33
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

BIN
bumbleberry-admin.tar.gz

Binary file not shown.

BIN
bumbleberry-application.tar.gz

Binary file not shown.

BIN
bumbleberry-web-fonts.tar.gz

Binary file not shown.

45
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

Loading…
Cancel
Save