Skip to content

Conversation

@stuartf
Copy link

@stuartf stuartf commented Jun 30, 2021

Updates to use more recent versions of build tools, the old versions can no longer build canvas-lms. Also fixes for docker image bloat/slowdown caused by using chown -R

@lbjay
Copy link
Member

lbjay commented Jul 1, 2021

Thanks for the PR. I wasn't paying attention during the build but it finished OK. When I run the resulting image I get an error I don't know enough about rails to interpret.
image

@stuartf
Copy link
Author

stuartf commented Jul 1, 2021

I think I got that as well but that it resolved itself after restarting the container. I'm not sure if there's a better way to fix it.

@lbjay
Copy link
Member

lbjay commented Jul 6, 2021

whoa that actually worked for me too. weird... i mean, working in some capacity is better than not working at all, so I'll probably mrege this. Would you mind adding a big, attention-getting note to the readme that mentions the need for this container restart?

@stuartf
Copy link
Author

stuartf commented Jul 6, 2021

I've added a healthcheck that notices when the landing page is returning a 500 error and restarts the canvas_web service in supervisord

assets/dbinit.sh Outdated
&& /opt/canvas/.gem/ruby/2.7.0/bin/bundle _2.2.19_ exec rake db:initial_setup

psql -U canvas -d canvas_development -c "INSERT INTO developer_keys (api_key, email, name, redirect_uri) VALUES ('test_developer_key', '[email protected]', 'Canvas Docker', 'http://localhost:8000');"
psql -U canvas -d canvas_development -c "INSERT INTO developer_keys (api_key, email, name, redirect_uri, root_account_id, access_token_count) VALUES ('test_developer_key', '[email protected]', 'Canvas Docker', 'http://localhost:8000', 1, 1);"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran into a build error during dbinit due to missing timestamps, but worked like a charm after the following change:

Suggested change
psql -U canvas -d canvas_development -c "INSERT INTO developer_keys (api_key, email, name, redirect_uri, root_account_id, access_token_count) VALUES ('test_developer_key', '[email protected]', 'Canvas Docker', 'http://localhost:8000', 1, 1);"
psql -U canvas -d canvas_development -c "INSERT INTO developer_keys (api_key, email, name, redirect_uri, root_account_id, access_token_count, created_at, updated_at) VALUES ('test_developer_key', '[email protected]', 'Canvas Docker', 'http://localhost:8000', 1, 1, NOW(), NOW());"

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.

3 participants