Skip to content
Snippets Groups Projects
  • Daniel Hunsaker's avatar
    3e4b01b4
    [Nanobox] Apply Release Notes Changes (#5670) · 3e4b01b4
    Daniel Hunsaker authored
    Apparently I missed some things in earlier commits/releases that needed to be applied to the Nanobox setup. All minor things, nothing that breaks anything, but still best to get them in place.
    
    - Move cron jobs to their own component, so the Sidekiq component can be scaled up to multiple instances without causing issues with running the same cron job multiple times at once.
    - Update cron jobs to the latest requirements, removing extraneous ones
    - Add new variables to `.env.nanobox`
    - Update Nginx to use correct cache header directives
    3e4b01b4
    History
    [Nanobox] Apply Release Notes Changes (#5670)
    Daniel Hunsaker authored
    Apparently I missed some things in earlier commits/releases that needed to be applied to the Nanobox setup. All minor things, nothing that breaks anything, but still best to get them in place.
    
    - Move cron jobs to their own component, so the Sidekiq component can be scaled up to multiple instances without causing issues with running the same cron job multiple times at once.
    - Update cron jobs to the latest requirements, removing extraneous ones
    - Add new variables to `.env.nanobox`
    - Update Nginx to use correct cache header directives
boxfile.yml 7.61 KiB
run.config:
  engine: ruby
  engine.config:
    runtime: ruby-2.4

  extra_packages:
    # basic servers:
    - nginx
    - nodejs

    # for images:
    - ImageMagick

    # for videos:
    - ffmpeg3

    # to prep the .env file:
    - gettext-tools

    # for node-gyp, used in the asset compilation process:
    - python-2

    # i18n:
    - libidn

  cache_dirs:
    - node_modules

  extra_path_dirs:
    - node_modules/.bin

  build_triggers:
    - .ruby-version
    - Gemfile
    - Gemfile.lock
    - package.json
    - yarn.lock

  extra_steps:
    - envsubst < .env.nanobox > .env
    - yarn

  fs_watch: true


deploy.config:
  extra_steps:
    - NODE_ENV=production bundle exec rake assets:precompile
  transform:
    - "sed 's/LOCAL_HTTPS=.*/LOCAL_HTTPS=true/i' /app/.env.nanobox | envsubst > /app/.env.production"
    - |-
        if [ -z "$LOCAL_DOMAIN" ]
        then
          . /app/.env.production
          export LOCAL_DOMAIN
        fi
        erb /app/nanobox/nginx-web.conf.erb > /app/nanobox/nginx-web.conf
        erb /app/nanobox/nginx-stream.conf.erb > /app/nanobox/nginx-stream.conf
    - touch /app/log/production.log
  before_live:
    web.web:
      - bundle exec rake db:migrate:setup


web.web:
  start:
    nginx: nginx -c /app/nanobox/nginx-web.conf
    rails: bundle exec puma -C /app/config/puma.rb

  routes: