harvard-dce / canvas-docker Goto Github PK
View Code? Open in Web Editor NEWContainerized Canvas instance for dev/testing
License: Apache License 2.0
Containerized Canvas instance for dev/testing
License: Apache License 2.0
Hi there!
I've pulled and run the latest version of canvas-docker from the docker hub, and I noticed that automatic emails don't get sent. This poses a problem when I try to create a new user, as I can't initiate a user with a password (they must confirm their email address by clicking on the link in the email they never received).
The stacktrace I found in the logs is:
Exception: SocketError: getaddrinfo: Name or service not known
...
/usr/lib/ruby/2.1.0/net/smtp.rb:520:in `start'
/opt/canvas-lms/vendor/bundle/ruby/2.1.0/gems/mail-2.5.4/lib/mail/network/delivery_methods/smtp.rb:112:in `deliver!'
/opt/canvas-lms/vendor/bundle/ruby/2.1.0/gems/mail-2.5.4/lib/mail/message.rb:2129:in `do_delivery'
/opt/canvas-lms/vendor/bundle/ruby/2.1.0/gems/mail-2.5.4/lib/mail/message.rb:232:in `block in deliver'
...
script/delayed_job:10:in `<main>'
It looks like the stacktrace is pointing to: https://github.com/instructure/canvas-lms/blob/stable/app/models/message.rb#L690
It looks like canvas uses this ruby gem to send emails: https://github.com/mikel/mail and according to the docs, it defaults to a local smtp server.
I'm not sure if canvas makes this configurable or not (could be verified by someone at instructure), but this could probably be resolved by adding http://www.postfix.org/ to the docker container setup process.
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash \
W: GPG error: https://deb.nodesource.com trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1655A0AB68576280
What operations do you need to use this in production?
Unable to login admin page
Using the admin user/pass login is [email protected] / canvas-docker.
On Updated Terms of Use page
Submit onagree T&C page, getting the below message
URL: https://talview-canvas.talview.dev/api/v1/users/self
Response: {"errors":[{"message":"The specified resource does not exist."}],"error_report_id":34}
How can I access the admin portal?
How can I set LTI tool?
Screenshot from 2020-07-29 13-56-46
I couldn't create any external-app, course, assessment its keep on redirecting login page,
Sometimes it asks to enable cookies, I did manually too.
@lbjay @rascalking @karendolan @nmaekawa @wassimseif
I just installed this today and found that it generates and error when the student tries to take a quiz.
Seems like there is a very verbose Gems error that is preventing the database from starting? A line:
PG::ConnectionBad: FATAL: the database system is starting up
I'm running docker build -t canvas-docker .
per the first step in the README.
i'm getting:
error The workspace feature is currently experimental and needs to be manually enabled - please add "workspaces-experimental true" to your .yarnrc file.
I'll include a bit more context:
Step 31/40 : RUN yarn install --pure-lockfile
---> Running in a8e8ece83d62
yarn install v0.27.5
error The workspace feature is currently experimental and needs to be manually enabled - please add "workspaces-experimental true" to your .yarnrc file.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
The command '/bin/sh -c yarn install --pure-lockfile' returned a non-zero code: 1
Here's the full output of the command:
https://pastebin.com/raw/eVNxu9cC
I know that the yarn being used here is inside Docker, because I don't even have yarn on my local machine.
I added RUN yarn config set workspaces-experimental true
to the Dockerfile, and that got me past this error -- YAY!
I'll send a pull request; you all can accept if you determine the experimental config to not pose any security risk or whatever. Thanks! (my first PR!)
This makes repeatable builds impossible (the build is broken right now, for example).
Here's a patch which pins the Canvas version (albeit to an older one) and seems to build:
diff --git a/Dockerfile b/Dockerfile
index bdf0776..e27e278 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -10,17 +10,12 @@ RUN apt-get update \
&& apt-get -y install curl software-properties-common \
&& add-apt-repository -y ppa:brightbox/ruby-ng \
&& apt-get update \
- && apt-get install -y ruby2.1 ruby2.1-dev supervisor redis-server \
+ && apt-get install -y ruby2.3 ruby2.3-dev supervisor redis-server \
zlib1g-dev libxml2-dev libxslt1-dev libsqlite3-dev postgresql \
postgresql-contrib libpq-dev libxmlsec1-dev curl make g++ git \
&& apt-get clean \
&& rm -Rf /var/cache/apt
-RUN curl -sL https://deb.nodesource.com/setup_6.x | bash \
- && apt-get install -y nodejs \
- && apt-get clean \
- && rm -Rf /var/cache/apt
-
# Set the locale to avoid active_model_serializers bundler install failure
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
@@ -32,8 +27,6 @@ RUN groupadd -r canvasuser -g 433 && \
adduser canvasuser sudo && \
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
-RUN gem install bundler --version 1.12.5
-
COPY assets/dbinit.sh /opt/canvas/dbinit.sh
COPY assets/start.sh /opt/canvas/start.sh
RUN chmod 755 /opt/canvas/*.sh
@@ -43,7 +36,12 @@ COPY assets/pg_hba.conf /etc/postgresql/9.3/main/pg_hba.conf
RUN sed -i "/^#listen_addresses/i listen_addresses='*'" /etc/postgresql/9.3/main/postgresql.conf
RUN cd /opt/canvas \
- && git clone https://github.com/instructure/canvas-lms.git
+ && curl -L https://github.com/instructure/canvas-lms/archive/release/2017-01-28.18.tar.gz -o canvas.tar.gz
+
+RUN cd /opt/canvas \
+ && tar -zxf canvas.tar.gz \
+ && rm canvas.tar.gz \
+ && mv canvas-lms-release-2017-01-28.18 canvas-lms
WORKDIR /opt/canvas/canvas-lms
@@ -57,11 +55,19 @@ RUN for config in amazon_s3 delayed_jobs domain file_store security external_mig
; do cp config/$config.yml.example config/$config.yml \
; done
+RUN gem install bundler --version 1.12.5
RUN $GEM_HOME/bin/bundle install --without="mysql"
-RUN npm install --unsafe-perm \
- && $GEM_HOME/bin/bundle exec rake canvas:compile_assets \
- && sudo npm install --unsafe-perm -g [email protected]
+RUN curl -sL https://deb.nodesource.com/setup_4.x | bash \
+ && apt-get install -y nodejs \
+ && apt-get clean \
+ && rm -Rf /var/cache/apt
+
+RUN npm install --unsafe-perm
+
+RUN $GEM_HOME/bin/bundle exec rake canvas:compile_assets_dev
+
+RUN sudo npm install --unsafe-perm -g [email protected]
RUN mkdir -p log tmp/pids public/assets public/stylesheets/compiled \
&& touch Gemmfile.lock
Possibilities:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.