Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker container definition #20

Closed
wants to merge 13 commits into from

Conversation

filipeforattini
Copy link

@filipeforattini filipeforattini commented Jun 11, 2020

Hey @inoda, nice to meet you!

First of all, your project is amazing! I was wondering on the internet and by accident discovery it.

Well, I saw few comments - as issues - to make it "containable" so I tried to help! 馃槈

I'd suggest as next steps for you to create your account at Docker Hub and make it available as a public container!

Keep the good work, you rock

@filipeforattini filipeforattini changed the title Develop Docker container definition Jun 11, 2020
@inoda
Copy link
Owner

inoda commented Jun 18, 2020

@filipeforattini Thanks so much for taking this on!!!

Couple notes/questions:

  1. I just updated some dependencies because of vulnerabilities, looks like that created some conflicts here (sorry).
  2. Someone made a Dockerfile for a different project here: https://github.com/inoda/journal/blob/master/Dockerfile, which didn't have a vendor/require me to create a Dockerhub account. Is there any reason this can't be the same way?

@filipeforattini
Copy link
Author

Hey! How are ya?

Don't worry! I've just updated using the new dependencies you set! :)

Well, about your question: I don't know if I fully understood (sry :/). You don't need to have a Docker Hub account because anyone can build locally and tag their own way. But wouldn't it be nice to have an official release? Take node's repository: https://hub.docker.com/_/node/. You could create an official https://hub.docker.com/_/ontrack/ or a common https://hub.docker.com/inoda/ontrack/ both for free. 馃槃

Anyway, your docker definition is not attached to a docker registry by code. That's why you will have docker build & docker push commands. I've made a suggestion for a personal Docker Hub account here on package.json #L59 as inoda/ontrack.

Let me know if there is anyway I can help you! :)

@luketainton
Copy link

Hey!

If you don't want to use Docker Hub, you can always use GitHub itself - https://docs.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-docker-for-use-with-github-packages

GitHub Actions can automatically build and push the image to the GitHub registry, and this is something I can help with if this is something you'd like to consider.

@inoda
Copy link
Owner

inoda commented Aug 8, 2020

@luketainton Sure! Could you test out the docker config in this PR too? If it works well I'll get this PR merged :)

@luketainton
Copy link

@luketainton Sure! Could you test out the docker config in this PR too? If it works well I'll get this PR merged :)

Sure thing - I'll give it a go and let you know how it goes 馃檪

@luketainton
Copy link

luketainton commented Aug 9, 2020

@luketainton Sure! Could you test out the docker config in this PR too? If it works well I'll get this PR merged :)

Sure thing - I'll give it a go and let you know how it goes 馃檪

Hi @inoda and @filipeforattini!

I tried to run the app using the docker-compose.yml file included in this PR. The app builds OK, but won't actually start. This is the log output:

app_1  | yarn run v1.22.4
app_1  | error Command "webpack" not found.
app_1  | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
app_1  | => Booting Puma
app_1  | => Rails 6.0.3.2 application starting in development
app_1  | => Run `rails server --help` for more startup options
app_1  | error Couldn't find an integrity file
app_1  | error Found 1 errors.
app_1  |
app_1  |
app_1  | ========================================
app_1  |   Your Yarn packages are out of date!
app_1  |   Please run `yarn install --check-files` to update.
app_1  | ========================================
app_1  |
app_1  |
app_1  | To disable this check, please change `check_yarn_integrity`
app_1  | to `false` in your webpacker config file (config/webpacker.yml).
app_1  |
app_1  |
app_1  | yarn check v1.22.4
app_1  | info Visit https://yarnpkg.com/en/docs/cli/check for documentation about this command.
app_1  |
app_1  |
app_1  | Exiting
ontrack_app_1 exited with code 1

I tried manually executing yarn install --check-files but it didn't help.

@inoda
Copy link
Owner

inoda commented Aug 9, 2020

@luketainton @filipeforattini I bet the issue is this conflict on yarn.lock - it's out of date w/ master. What if you update the yarn.lock file with what's on the master branch? You could just copy paste the file over.

@luketainton
Copy link

@inoda that didn't work - I'm getting similar errors:

app_1  | error Lockfile does not contain pattern: "@babel/preset-react@^7.10.1"
app_1  | error Lockfile does not contain pattern: "@rails/webpacker@5.1.1"
app_1  | error Lockfile does not contain pattern: "axios@^0.19.2"
app_1  | error Lockfile does not contain pattern: "chart.js@^2.9.3"
app_1  | error Lockfile does not contain pattern: "moment@^2.27.0"
app_1  | error Lockfile does not contain pattern: "react@^16.13.1"
app_1  | error Lockfile does not contain pattern: "react-datepicker@^3.0.0"
app_1  | error Lockfile does not contain pattern: "react-dom@^16.13.1"
app_1  | error Lockfile does not contain pattern: "sweetalert2@^9.15.2"
app_1  | error Lockfile does not contain pattern: "webpack-dev-server@^3.11.0"
app_1  | error Couldn't find an integrity file
app_1  | error Found 11 errors.
app_1  |
app_1  |
app_1  | ========================================
app_1  |   Your Yarn packages are out of date!
app_1  |   Please run `yarn install --check-files` to update.
app_1  | ========================================
app_1  |
app_1  |
app_1  | To disable this check, please change `check_yarn_integrity`
app_1  | to `false` in your webpacker config file (config/webpacker.yml).
app_1  |
app_1  |
app_1  | yarn check v1.22.4
app_1  | info Visit https://yarnpkg.com/en/docs/cli/check for documentation about this command.
app_1  |
app_1  |
app_1  | yarn run v1.22.4
app_1  | error Command "webpack" not found.
app_1  | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
app_1  | => Booting Puma
app_1  | => Rails 6.0.3.2 application starting in development
app_1  | => Run `rails server --help` for more startup options
app_1  | error Lockfile does not contain pattern: "@babel/preset-react@^7.10.1"
app_1  | error Lockfile does not contain pattern: "@rails/webpacker@5.1.1"
app_1  | error Lockfile does not contain pattern: "axios@^0.19.2"
app_1  | error Lockfile does not contain pattern: "chart.js@^2.9.3"
app_1  | error Lockfile does not contain pattern: "moment@^2.27.0"
app_1  | error Lockfile does not contain pattern: "react@^16.13.1"
app_1  | error Lockfile does not contain pattern: "react-datepicker@^3.0.0"
app_1  | error Lockfile does not contain pattern: "react-dom@^16.13.1"
app_1  | error Lockfile does not contain pattern: "sweetalert2@^9.15.2"
app_1  | error Lockfile does not contain pattern: "webpack-dev-server@^3.11.0"
app_1  | error Couldn't find an integrity file
app_1  | error Found 11 errors.
app_1  |
app_1  |
app_1  | ========================================
app_1  |   Your Yarn packages are out of date!
app_1  |   Please run `yarn install --check-files` to update.
app_1  | ========================================
app_1  |
app_1  |
app_1  | To disable this check, please change `check_yarn_integrity`
app_1  | to `false` in your webpacker config file (config/webpacker.yml).
app_1  |
app_1  |
app_1  | yarn check v1.22.4
app_1  | info Visit https://yarnpkg.com/en/docs/cli/check for documentation about this command.
app_1  |
app_1  |
app_1  | Exiting
ontrack_app_1 exited with code 1

@inoda
Copy link
Owner

inoda commented Aug 9, 2020

@luketainton Weird...I'm really not familiar with docker but this is just a standard Rails 6 app. I did some quick googling and found this - might be helpful: rails/webpacker#1568

@inoda inoda mentioned this pull request Aug 9, 2020
@luketainton
Copy link

@luketainton Weird...I'm really not familiar with docker but this is just a standard Rails 6 app. I did some quick googling and found this - might be helpful: rails/webpacker#1568

This issue has suggested not using yarn.lock and having the container generate it:

What worked for me is not to COPY the yarn.lock to the image by Dockerfile.

yarn.lock must be generate after Dockerfile execute "RUN yarn install". Try remove yarn.lock from your project too and run the "docker-compose up --build" again.

I'll try this and see what happens.

@luketainton
Copy link

OK, even without the yarn.lock file, I'm still getting the same error. What's also strange is this error, the fix for which already exists in the specified file:

To disable this check, please change `check_yarn_integrity`
to `false` in your webpacker config file (config/webpacker.yml).

@inoda
Copy link
Owner

inoda commented Aug 11, 2020

@luketainton Oh I think the issue is that this tries to start the app in the development env. Probably should be production.

@luketainton
Copy link

@luketainton Oh I think the issue is that this tries to start the app in the development env. Probably should be production.

I get this error, then the container exits:
ArgumentError: Missing 'secret_key_base' for 'production' environment, set this string with 'rails credentials:edit'

My experience with Ruby is non-existent - what file(s) do I need to edit? I can't run that command in the container as it doesn't have an editor installed.

@hkalexling
Copy link

@luketainton I was also trying to make this work, and I think you can set the SECRET_KEY_BASE environment variable to a random string. Here's what the environment section in my docker-compose.yml file looks like

    environment:
      NODE_ENV: production
      RAILS_ENV: production
      DATABASE_URL: postgres://ontrack:secret@db/ontrack
      SECRET_KEY_BASE: <a random string I generated as the secret key>

I am not familiar with Rails either, so I am not sure if it's the "correct" way to resolve this, but it works :)

@inoda
Copy link
Owner

inoda commented Aug 29, 2020

@luketainton Any luck with this? I think you can generate a value for SECRET_KEY_BASE by running rails secret.

rails secret
> ef86ef29d53577f2ae17a4fcb2b2de0db95712e3e4b206db504fb7fa12f6f602d659e4b12f54eb842a9af510a3bc6d297e02a96fbb6e7b00b20f006203819981

@luketainton
Copy link

To be honest I'd tried a few times without any luck so I was starting to get a little disheartened, but I'll give it another go and let you know what happens.

@filipeforattini
Copy link
Author

Hey guys! Excuse me please, I've should have helped you guys before, I've forgotten about this PR. disappointed

@luketainton & @inoda
I've created a workaround running yarn inside the docker build process. Now the dependencies are installed always targeting the same architecture. This Please run 'yarn install --check-files' to update. should now happen anymore.

@luketainton & @hkalexling
There was a missing config secret_key_base in the project, just added with config/secret.ymlthat asks for this SECRET_KEY_BASE environment variable. Just updated our docker-compose.yml to reflect those changes!

    environment:
      NODE_ENV: development
      RAILS_ENV: development
      SECRET_KEY_BASE: super-secret
      DATABASE_URL: postgres://ontrack:secret@database/ontrack

Take care for a production environment that right now requires SSL connection. You can follow this config up at:

#config/environments/production.rb
  config.force_ssl = true

Can you guys give it another try on your tests? I hope we will have some progress! 馃槂

@luketainton
Copy link

luketainton commented Sep 7, 2020

Hi @filipeforattini

I'm seeing the following errors on my app container:

yarn run v1.22.5
error Command "webpack" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
=> Booting Puma
=> Rails 6.0.3.2 application starting in development
=> Run `rails server --help` for more startup options
error Couldn't find an integrity file
error Found 1 errors.
app_1  |
app_1  |
========================================
  Your Yarn packages are out of date!
  Please run `yarn install --check-files` to update.
========================================
app_1  |
app_1  |
To disable this check, please change `check_yarn_integrity`
to `false` in your webpacker config file (config/webpacker.yml).
app_1  |
app_1  |
yarn check v1.22.5
info Visit https://yarnpkg.com/en/docs/cli/check for documentation about this command.

The postgres container is spinning up fine. I'll try switching to production environment and see if anything changes.

@luketainton
Copy link

I'll try switching to production environment and see if anything changes.

Ok, there is different behaviour. It seems to run the db migrations and start the application, but I get a 500 error when trying to access it. Logs below.

== 20190928210011 CreateCategories: migrating =================================
-- create_table(:categories)
   -> 0.1460s
== 20190928210011 CreateCategories: migrated (0.1463s) ========================
app_1  |
== 20190928210020 CreateExpenses: migrating ===================================
-- create_table(:expenses)
   -> 0.0757s
== 20190928210020 CreateExpenses: migrated (0.0768s) ==========================
app_1  |
== 20191005164155 CreateUsers: migrating ======================================
-- create_table(:users)
   -> 0.0985s
== 20191005164155 CreateUsers: migrated (0.0998s) =============================
app_1  |
== 20191005193945 CreatesTotalGoal: migrating =================================
-- remove_column(:categories, :annual_goal)
   -> 0.0025s
-- add_column(:users, :monthly_goal, :integer, {:default=>0})
   -> 0.0024s
== 20191005193945 CreatesTotalGoal: migrated (0.0068s) ========================
app_1  |
== 20191005195440 ChangesCatGoalsToMonthly: migrating =========================
-- add_column(:categories, :monthly_goal, :integer, {:default=>0})
   -> 0.0023s
== 20191005195440 ChangesCatGoalsToMonthly: migrated (0.0034s) ================
app_1  |
yarn run v1.22.5
error Command "webpack" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
=> Booting Puma
=> Rails 6.0.3.2 application starting in production
=> Run `rails server --help` for more startup options
Puma starting in single mode...
* Version 3.12.6 (ruby 2.6.5-p114), codename: Llamas in Pajamas
* Min threads: 5, max threads: 5
* Environment: production
* Listening on tcp://0.0.0.0:3000
Use Ctrl-C to stop
Error during failsafe response: The asset "404.png" is not present in the asset pipeline.
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/helper.rb:83:in `compute_asset_path'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/helpers/asset_url_helper.rb:201:in `asset_path'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/helpers/asset_url_helper.rb:376:in `image_path'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/helpers/asset_tag_helper.rb:452:in `resolve_image_source'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/helpers/asset_tag_helper.rb:345:in `image_tag'
  /ontrack/app/app/views/errors/not_found.html.erb:8:in `_app_views_errors_not_found_html_erb___3834063445554154409_47042275873420'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/base.rb:274:in `_run'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/template.rb:185:in `block in render'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/notifications.rb:182:in `instrument'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/template.rb:385:in `instrument_render_template'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/template.rb:183:in `render'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/renderer/template_renderer.rb:58:in `block (2 levels) in render_template'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/renderer/abstract_renderer.rb:88:in `block in instrument'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/notifications.rb:180:in `block in instrument'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/notifications.rb:180:in `instrument'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/renderer/abstract_renderer.rb:87:in `instrument'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/renderer/template_renderer.rb:57:in `block in render_template'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/renderer/template_renderer.rb:65:in `render_with_layout'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/renderer/template_renderer.rb:56:in `render_template'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/renderer/template_renderer.rb:13:in `render'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/renderer/renderer.rb:61:in `render_template_to_object'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/renderer/renderer.rb:29:in `render_to_object'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/rendering.rb:117:in `block in _render_template'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/base.rb:304:in `in_rendering_context'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/rendering.rb:116:in `_render_template'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/streaming.rb:218:in `_render_template'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/rendering.rb:103:in `render_to_body'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/rendering.rb:52:in `render_to_body'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/renderers.rb:142:in `render_to_body'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/abstract_controller/rendering.rb:25:in `render'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/rendering.rb:36:in `render'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/instrumentation.rb:44:in `block (2 levels) in render'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/core_ext/benchmark.rb:14:in `block in ms'
  /opt/bitnami/ruby/lib/ruby/2.6.0/benchmark.rb:308:in `realtime'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/core_ext/benchmark.rb:14:in `ms'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/instrumentation.rb:44:in `block in render'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/instrumentation.rb:84:in `cleanup_view_runtime'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/railties/controller_runtime.rb:39:in `cleanup_view_runtime'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/instrumentation.rb:43:in `render'
  /ontrack/app/app/controllers/errors_controller.rb:5:in `not_found'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/abstract_controller/base.rb:195:in `process_action'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/rendering.rb:30:in `process_action'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/callbacks.rb:135:in `run_callbacks'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/abstract_controller/callbacks.rb:41:in `process_action'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/rescue.rb:22:in `process_action'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/instrumentation.rb:33:in `block in process_action'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/notifications.rb:180:in `block in instrument'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/notifications.rb:180:in `instrument'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/instrumentation.rb:32:in `process_action'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/abstract_controller/base.rb:136:in `process'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/rendering.rb:39:in `process'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_controller/metal.rb:190:in `dispatch'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_controller/metal.rb:254:in `dispatch'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_dispatch/routing/route_set.rb:33:in `serve'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_dispatch/journey/router.rb:49:in `block in serve'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_dispatch/journey/router.rb:32:in `each'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_dispatch/journey/router.rb:32:in `serve'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_dispatch/routing/route_set.rb:834:in `call'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_dispatch/middleware/show_exceptions.rb:50:in `render_exception'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_dispatch/middleware/show_exceptions.rb:36:in `rescue in call'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/railties-6.0.3.2/lib/rails/rack/logger.rb:37:in `call_app'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/railties-6.0.3.2/lib/rails/rack/logger.rb:26:in `block in call'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/tagged_logging.rb:80:in `block in tagged'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/tagged_logging.rb:28:in `tagged'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/tagged_logging.rb:80:in `tagged'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/railties-6.0.3.2/lib/rails/rack/logger.rb:26:in `call'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_dispatch/middleware/request_id.rb:27:in `call'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/rack-2.2.3/lib/rack/method_override.rb:24:in `call'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/rack-2.2.3/lib/rack/runtime.rb:22:in `call'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_dispatch/middleware/executor.rb:14:in `call'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/rack-2.2.3/lib/rack/sendfile.rb:110:in `call'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_dispatch/middleware/ssl.rb:74:in `call'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_dispatch/middleware/host_authorization.rb:76:in `call'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/railties-6.0.3.2/lib/rails/engine.rb:527:in `call'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/puma-3.12.6/lib/puma/configuration.rb:227:in `call'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/puma-3.12.6/lib/puma/server.rb:706:in `handle_request'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/puma-3.12.6/lib/puma/server.rb:476:in `process_client'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/puma-3.12.6/lib/puma/server.rb:334:in `block in run'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/puma-3.12.6/lib/puma/thread_pool.rb:135:in `block in spawn_thread'
Error during failsafe response: The asset "404.png" is not present in the asset pipeline.
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/helper.rb:83:in `compute_asset_path'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/helpers/asset_url_helper.rb:201:in `asset_path'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/helpers/asset_url_helper.rb:376:in `image_path'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/helpers/asset_tag_helper.rb:452:in `resolve_image_source'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/helpers/asset_tag_helper.rb:345:in `image_tag'
  /ontrack/app/app/views/errors/not_found.html.erb:8:in `_app_views_errors_not_found_html_erb___3834063445554154409_47042275873420'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/base.rb:274:in `_run'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/template.rb:185:in `block in render'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/notifications.rb:182:in `instrument'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/template.rb:385:in `instrument_render_template'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/template.rb:183:in `render'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/renderer/template_renderer.rb:58:in `block (2 levels) in render_template'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/renderer/abstract_renderer.rb:88:in `block in instrument'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/notifications.rb:180:in `block in instrument'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/notifications.rb:180:in `instrument'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/renderer/abstract_renderer.rb:87:in `instrument'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/renderer/template_renderer.rb:57:in `block in render_template'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/renderer/template_renderer.rb:65:in `render_with_layout'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/renderer/template_renderer.rb:56:in `render_template'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/renderer/template_renderer.rb:13:in `render'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/renderer/renderer.rb:61:in `render_template_to_object'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/renderer/renderer.rb:29:in `render_to_object'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/rendering.rb:117:in `block in _render_template'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/base.rb:304:in `in_rendering_context'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/rendering.rb:116:in `_render_template'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/streaming.rb:218:in `_render_template'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/rendering.rb:103:in `render_to_body'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/rendering.rb:52:in `render_to_body'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/renderers.rb:142:in `render_to_body'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/abstract_controller/rendering.rb:25:in `render'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/rendering.rb:36:in `render'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/instrumentation.rb:44:in `block (2 levels) in render'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/core_ext/benchmark.rb:14:in `block in ms'
  /opt/bitnami/ruby/lib/ruby/2.6.0/benchmark.rb:308:in `realtime'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/core_ext/benchmark.rb:14:in `ms'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/instrumentation.rb:44:in `block in render'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/instrumentation.rb:84:in `cleanup_view_runtime'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/railties/controller_runtime.rb:39:in `cleanup_view_runtime'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/instrumentation.rb:43:in `render'
  /ontrack/app/app/controllers/errors_controller.rb:5:in `not_found'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/abstract_controller/base.rb:195:in `process_action'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/rendering.rb:30:in `process_action'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/callbacks.rb:135:in `run_callbacks'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/abstract_controller/callbacks.rb:41:in `process_action'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/rescue.rb:22:in `process_action'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/instrumentation.rb:33:in `block in process_action'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/notifications.rb:180:in `block in instrument'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/notifications.rb:180:in `instrument'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/instrumentation.rb:32:in `process_action'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/abstract_controller/base.rb:136:in `process'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionview-6.0.3.2/lib/action_view/rendering.rb:39:in `process'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_controller/metal.rb:190:in `dispatch'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_controller/metal.rb:254:in `dispatch'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_dispatch/routing/route_set.rb:33:in `serve'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_dispatch/journey/router.rb:49:in `block in serve'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_dispatch/journey/router.rb:32:in `each'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_dispatch/journey/router.rb:32:in `serve'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_dispatch/routing/route_set.rb:834:in `call'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_dispatch/middleware/show_exceptions.rb:50:in `render_exception'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_dispatch/middleware/show_exceptions.rb:36:in `rescue in call'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/railties-6.0.3.2/lib/rails/rack/logger.rb:37:in `call_app'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/railties-6.0.3.2/lib/rails/rack/logger.rb:26:in `block in call'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/tagged_logging.rb:80:in `block in tagged'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/tagged_logging.rb:28:in `tagged'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/tagged_logging.rb:80:in `tagged'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/railties-6.0.3.2/lib/rails/rack/logger.rb:26:in `call'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_dispatch/middleware/request_id.rb:27:in `call'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/rack-2.2.3/lib/rack/method_override.rb:24:in `call'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/rack-2.2.3/lib/rack/runtime.rb:22:in `call'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_dispatch/middleware/executor.rb:14:in `call'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/rack-2.2.3/lib/rack/sendfile.rb:110:in `call'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_dispatch/middleware/ssl.rb:74:in `call'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.2/lib/action_dispatch/middleware/host_authorization.rb:76:in `call'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/railties-6.0.3.2/lib/rails/engine.rb:527:in `call'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/puma-3.12.6/lib/puma/configuration.rb:227:in `call'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/puma-3.12.6/lib/puma/server.rb:706:in `handle_request'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/puma-3.12.6/lib/puma/server.rb:476:in `process_client'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/puma-3.12.6/lib/puma/server.rb:334:in `block in run'
  /opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/puma-3.12.6/lib/puma/thread_pool.rb:135:in `block in spawn_thread'

@filipeforattini
Copy link
Author

filipeforattini commented Sep 7, 2020

Hey @luketainton, I'd suggest for a local environment wipe. You may accomplish that with the following:

$ docker-compose down -v
# database-wise wipe

$ docker-compose build --no-cache
# recreates your app container with the right dependencies

$ docker-compose up -d

I fully tested with a development environment so far. I've tried to switch to a production environment, but once it required me a SSL connection I stopped. Maybe, it might make sense to move this particular config to be set using another environment var.

@hkalexling
Copy link

Hi @filipeforattini, I tried your fork but I got the Couldn't find an integrity file error that @luketainton mentioned above. The error goes away when the NODE_ENV and RAILS_ENV environment variables are set to PRODUCTION. Any idea how to fix it in the development environment?

@inoda
Copy link
Owner

inoda commented Oct 9, 2020

See #36

@inoda inoda closed this Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants