Adds development mode, improves the assets, updates the README with helpful information!
This commit is contained in:
parent
457bfdbc04
commit
c95e624de9
@ -15,7 +15,12 @@ WORKDIR /app/BikeBike
|
|||||||
|
|
||||||
RUN bundle install
|
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.
|
# Add a script to be executed every time the container starts.
|
||||||
COPY entrypoint.sh /usr/bin/
|
COPY entrypoint.sh /usr/bin/
|
||||||
|
33
README.md
33
README.md
@ -3,7 +3,7 @@
|
|||||||
| Environment | Build Status |
|
| Environment | Build Status |
|
||||||
| ----------- |:------------:|
|
| ----------- |:------------:|
|
||||||
| Development | [](https://travis-ci.org/bikebike/BikeBike) |
|
| Development | [](https://travis-ci.org/bikebike/BikeBike) |
|
||||||
| Production | [](https://travis-ci.org/bikebike/BikeBike) |
|
| Production | It works with this Fork! |
|
||||||
|
|
||||||
## About 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.
|
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
|
## From bikebike/bikebike
|
||||||
|
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,4 +1,7 @@
|
|||||||
BikeBike::Application.configure do
|
BikeBike::Application.configure do
|
||||||
|
|
||||||
|
config.app_config = config_for(:app_config)
|
||||||
|
|
||||||
# Settings specified here will take precedence over those in config/application.rb.
|
# Settings specified here will take precedence over those in config/application.rb.
|
||||||
|
|
||||||
# In the development environment your application's code is reloaded on
|
# 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
|
# This option may cause significant delays in view rendering with a large
|
||||||
# number of complex assets.
|
# number of complex assets.
|
||||||
config.assets.debug = true
|
config.assets.debug = true
|
||||||
config.assets.digest = true
|
config.assets.digest = true
|
||||||
config.assets.compile = true
|
config.assets.compile = true
|
||||||
config.assets.precompile += %w(*.png *.jpg *.jpeg *.gif *.json *.ttf *.otf *.woff *.woff2 *.svg *.json)
|
|
||||||
|
|
||||||
# to deliver to the browser instead of email
|
config.assets.unknown_asset_fallback = false
|
||||||
config.action_mailer.delivery_method = :letter_opener
|
config.assets.precompile = ["manifest.js"]
|
||||||
config.action_mailer.raise_delivery_errors = true
|
config.assets.check_precompiled_asset = false
|
||||||
config.action_mailer.perform_deliveries = true
|
|
||||||
|
# Version of your assets, change this if you want to expire all your assets.
|
||||||
|
config.assets.version = '1.01'
|
||||||
|
|
||||||
config.serve_static_files = true
|
config.serve_static_files = true
|
||||||
|
|
||||||
I18n.config.language_detection_method = I18n::Config::DETECT_LANGUAGE_FROM_URL_PARAM
|
# to deliver to the browser instead of email
|
||||||
|
#config.action_mailer.delivery_method = :letter_opener
|
||||||
|
#config.action_mailer.raise_delivery_errors = true
|
||||||
|
#config.action_mailer.perform_deliveries = true
|
||||||
|
|
||||||
Paypal.sandbox!
|
# SMTP real-world test
|
||||||
config.action_controller.default_url_options = { trailing_slash: true }
|
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
|
||||||
|
|
||||||
|
|
||||||
|
# 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 }
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user