Giter VIP home page Giter VIP logo

docker-canvas's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-canvas's Issues

Enable SSL

Why best way to enable ssl in docker?

I'm using docker, s3 and cloudfront for reverse proxy, but some links in canvas is generated in http, not https.

In deploy/domain.yml ssl config has true value.

Can help me?

[Question] How to send emails when adding accounts

I add accounts with checking "Email the user about this account creation" on the the Administrator Console(GUI), but the email isn't sent.
"Unpermitted parameter: :send_confirmation" is shown in the log file.

[9f1285c5665db038cb1ed73c92453e35 f799a8ab-be92-4f2b-bdc9-1b8a0f5b4cf5]   SQL Pseudonym Load (1.6ms)  SELECT "pseudonyms".* FROM "public"."pseudonyms" WHERE "pseudonyms"."account_id" = 1 AND "pseudonyms"."workflow_state" = 'active' AND (LOWER(unique_id)=LOWER('[email protected]')) ORDER BY "pseudonyms"."id" ASC LIMIT 1  [development:1 primary]
[9f1285c5665db038cb1ed73c92453e35 f799a8ab-be92-4f2b-bdc9-1b8a0f5b4cf5] Unpermitted parameter: :send_confirmation
[9f1285c5665db038cb1ed73c92453e35 f799a8ab-be92-4f2b-bdc9-1b8a0f5b4cf5]   SQL Pseudonym Exists (1.5ms)  SELECT 1 AS one FROM "public"."pseudonyms" WHERE "pseudonyms"."workflow_state" != 'deleted' AND (LOWER(unique_id)=LOWER('[email protected]')) AND "pseudonyms"."account_id" = 1 AND "pseudonyms"."authentication_provider_id" IS NULL AND "pseudonyms"."id" IS NOT NULL LIMIT 1  [development:1 primary]

* The Canvas application is ran with the development mode.

Do I need give the administrator accounts any roles for me?
If you know, could you please give me advice?

Build issues with self-built container

While poking around for #8, I realized that the Docker Hub version of Canvas was two years old, not sufficient for my testing. However, I couldn't get the instructions in this repo's README to work.

After building my own image (suspiciously quick and not as resource intensive as claimed) per the command in this repo's readme on a fresh checkout of canvas-lms, I tried to follow the rest of the instructions and had this happen:

jade@ubuntu-vm:~$ cd docker-canvas/
jade@ubuntu-vm:~/docker-canvas$ docker-compose up -d db
Starting docker-canvas_db_1 ... done
jade@ubuntu-vm:~/docker-canvas$ docker-compose run --rm app bundle exec rake db:create db:initial_setup
Starting docker-canvas_db_1    ... done                                                                                                                                                                                                                                                                                      Starting docker-canvas_redis_1 ... done
Starting docker-canvas_mail_1  ... done
Could not locate Gemfile or .bundle/ directory
jade@ubuntu-vm:~/docker-canvas$ docker-compose run --rm app ls
Starting docker-canvas_mail_1  ... done                                                                                                                                                                                                                                                                                      Starting docker-canvas_redis_1 ... done
Starting docker-canvas_db_1    ... done
app          config  log           packages  public   tmp     wait-for-it.sh
client_apps  gems    node_modules  pacts     reports  vendor
jade@ubuntu-vm:~/docker-canvas$ docker-compose run --rm app ls -a
Starting docker-canvas_mail_1  ... done                                                                                                                                                                                                                                                                                      Starting docker-canvas_redis_1 ... done
Starting docker-canvas_db_1    ... done
.    client_apps  log           pacts    tmp             .yardoc
..   config       node_modules  public   vendor
app  gems         packages      reports  wait-for-it.sh

Later I set up an environment with the official Canvas stuff (which is more fiddly to get working than this one) and found that the /usr/src/app, which is the working directory in both these images, seemed to be missing a bunch of stuff in the one built per the instructions here compared to the one made with the official Canvas instructions.

Here's the exact commands I ran to get that bad image:

(NOTE: this git magic just gets a second fresh working tree without having to clone it)
jade@ubuntu-vm:~/canvas-lms$ git worktree add ../canvas-lms-test1
Preparing worktree (new branch 'canvas-lms-test1')
HEAD is now at 008ea7fd2f treesame commit of origin/stable/2021-01-06
jade@ubuntu-vm:~/canvas-lms$ cd ..
jade@ubuntu-vm:~$ cd canvas-lms-test1
jade@ubuntu-vm:~/canvas-lms-test1$ git switch -c stable1 stable
Switched to a new branch 'stable1'
jade@ubuntu-vm:~/canvas-lms-test1$ docker build -t instructure/canvas-lms:stable .
Sending build context to Docker daemon  186.2MB
Step 1/25 : ARG RUBY=2.6-p6.0.4
Step 2/25 : FROM instructure/ruby-passenger:$RUBY
 ---> 950ff534d8a2
Step 3/25 : LABEL maintainer="Instructure"
<...>
Successfully tagged instructure/canvas-lms:stable
jade@ubuntu-vm:~/canvas-lms-test1$ docker run -it --rm instructure/canvas-lms:stable ls
app          config  log           packages  public   tmp
client_apps  gems    node_modules  pacts     reports

Fix issues preventing course content import

Issue 1: Course content import is giving an error.

  • Problem: The web container is referencing a directory that only exists in the worker container, so the system never finds the folder.
  • Solution: Create a shared directory between the two containers (web and worker).

Issue 2: Course quiz import is giving an error.

  • Problem: QTIMigrationTool missing on the worker container
  • Solution: Add QTIMigrationTool on the worker container

Issue 3: Timeout error when importing

  • Problem: Unknown
  • Solution: Unknown

Error when building docker image

I'm running into errors building the canvas-lms docker image. Wondering if anyone else is encountering this and if you have suggestions on how to fix it.

Environment: macOS

canvas-lms ref: tried on both 9ad21650ebbee144bd96a28aab53507a1bcefc6c and release/2021-06-23.26, which should both work according to the README of this repo

Steps:

git clone https://github.com/instructure/canvas-lms.git
cd canvas-lms
git checkout 9ad21650ebbee144bd96a28aab53507a1bcefc6c
cp ../docker-canvas/Dockerfile.prod.with.fixes .
docker build -t instructure/canvas-lms:stable -f Dockerfile.prod.with.fixes .

This results in:

[+] Building 24.9s (13/14)                                                                                                                                                                                  
 => [internal] load build definition from Dockerfile.prod.with.fixes                                                                                                                                   0.0s
 => => transferring dockerfile: 53B                                                                                                                                                                    0.0s
 => [internal] load .dockerignore                                                                                                                                                                      0.0s
 => => transferring context: 35B                                                                                                                                                                       0.0s
 => [internal] load metadata for docker.io/instructure/ruby-passenger:2.6-p6.0.4                                                                                                                       2.4s
 => [ 1/10] FROM docker.io/instructure/ruby-passenger:2.6-p6.0.4@sha256:38afe4ecb66bcdcb408aa641d96968245528de0535c5d2d3cdf85acec21aabb4                                                               0.0s
 => [internal] load build context                                                                                                                                                                      5.0s
 => => transferring context: 74.87MB                                                                                                                                                                   5.0s
 => CACHED [ 2/10] WORKDIR /usr/src/app/                                                                                                                                                               0.0s
 => CACHED [ 3/10] RUN if [ -n "$USER_ID" ]; then usermod -u "${USER_ID}" docker         && chown --from=9999 docker /usr/src/nginx /usr/src/app -R; fi                                                0.0s
 => CACHED [ 4/10] RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -   && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -   && echo "deb https://dl.yarnpkg.com/debian/ s  0.0s
 => CACHED [ 5/10] RUN cd "$(mktemp -d)" &&     curl -SLO 'http://archive.apache.org/dist/pulsar/pulsar-'2.6.1'/DEB/apache-pulsar-client.deb' &&     curl -SLO 'http://archive.apache.org/dist/pulsar  0.0s
 => CACHED [ 6/10] RUN if [ -e /var/lib/gems/2.6.0/gems/bundler-* ]; then BUNDLER_INSTALL="-i /var/lib/gems/2.6.0"; fi   && gem uninstall --all --ignore-dependencies --force $BUNDLER_INSTALL bundle  0.0s
 => CACHED [ 7/10] RUN npm install -g npm@latest && npm cache clean --force                                                                                                                            0.0s
 => CACHED [ 8/10] COPY --chown=docker:docker . /usr/src/app/                                                                                                                                          0.0s
 => ERROR [ 9/10] RUN bundle install --jobs 8   && yarn install --pure-lockfile --network-timeout 600000 --network-concurrency 1   && bundle lock --local --conservative                              17.3s
------                                                                                                                                                                                                      
 > [ 9/10] RUN bundle install --jobs 8   && yarn install --pure-lockfile --network-timeout 600000 --network-concurrency 1   && bundle lock --local --conservative:                                          
#13 0.982 Fetching https://github.com/rails-api/active_model_serializers.git                                                                                                                                
#13 2.769 Fetching https://github.com/robotdana/json_schemer.git                                                                                                                                            
#13 3.761 Fetching https://github.com/instructure/week-of-month.git                                                                                                                                         
#13 4.983 Fetching https://github.com/kreynolds/cassandra-cql.git                                                                                                                                           
#13 6.016 Fetching https://github.com/twitter/thrift_client.git
#13 7.149 Fetching https://github.com/instructure/test-queue.git
#13 10.60 Fetching gem metadata from https://rubygems.org/.......
#13 16.83 Resolving dependencies...
#13 16.84 Bundler could not find compatible versions for gem "bundler":
#13 16.84   In Gemfile:
#13 16.84     bundler (>= 2.2.0, <= 2.2.16)
#13 16.84 
#13 16.84   Current Bundler version:
#13 16.84     bundler (2.2.17)
#13 16.84 
#13 16.84 Your bundle requires a different version of Bundler than the one you're running.
#13 16.84 Install the necessary version with `gem install bundler:2.2.16` and rerun
#13 16.84 bundler using `bundle _2.2.16_ install --jobs 8`
------
executor failed running [/bin/sh -c bundle install --jobs 8   && yarn install --pure-lockfile --network-timeout 600000 --network-concurrency 1   && bundle lock --local --conservative]: exit code: 6

It looks like there's a bundler version mismatch, which seems to get solved when trying release/2021-06-23.26 but then it results in a different error.

Steps:

git checkout tags/release/2021-06-23.26
docker build -t instructure/canvas-lms:stable -f Dockerfile.prod.with.fixes .

Results:

[+] Building 332.5s (14/14) FINISHED                                                                                                                                                                        
 => [internal] load build definition from Dockerfile.prod.with.fixes                                                                                                                                   0.0s
 => => transferring dockerfile: 53B                                                                                                                                                                    0.0s
 => [internal] load .dockerignore                                                                                                                                                                      0.0s
 => => transferring context: 35B                                                                                                                                                                       0.0s
 => [internal] load metadata for docker.io/instructure/ruby-passenger:2.6-p6.0.4                                                                                                                       0.5s
 => [ 1/10] FROM docker.io/instructure/ruby-passenger:2.6-p6.0.4@sha256:38afe4ecb66bcdcb408aa641d96968245528de0535c5d2d3cdf85acec21aabb4                                                               0.0s
 => [internal] load build context                                                                                                                                                                      3.3s
 => => transferring context: 78.11MB                                                                                                                                                                   3.2s
 => CACHED [ 2/10] WORKDIR /usr/src/app/                                                                                                                                                               0.0s
 => CACHED [ 3/10] RUN if [ -n "$USER_ID" ]; then usermod -u "${USER_ID}" docker         && chown --from=9999 docker /usr/src/nginx /usr/src/app -R; fi                                                0.0s
 => CACHED [ 4/10] RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -   && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -   && echo "deb https://dl.yarnpkg.com/debian/ s  0.0s
 => CACHED [ 5/10] RUN cd "$(mktemp -d)" &&     curl -SLO 'http://archive.apache.org/dist/pulsar/pulsar-'2.6.1'/DEB/apache-pulsar-client.deb' &&     curl -SLO 'http://archive.apache.org/dist/pulsar  0.0s
 => CACHED [ 6/10] RUN if [ -e /var/lib/gems/2.6.0/gems/bundler-* ]; then BUNDLER_INSTALL="-i /var/lib/gems/2.6.0"; fi   && gem uninstall --all --ignore-dependencies --force $BUNDLER_INSTALL bundle  0.0s
 => CACHED [ 7/10] RUN npm install -g npm@latest && npm cache clean --force                                                                                                                            0.0s
 => CACHED [ 8/10] COPY --chown=docker:docker . /usr/src/app/                                                                                                                                          0.0s
 => CACHED [ 9/10] RUN bundle install --jobs 8   && yarn install --pure-lockfile --network-timeout 600000 --network-concurrency 1   && bundle lock --local --conservative                              0.0s
 => ERROR [10/10] RUN COMPILE_ASSETS_NPM_INSTALL=0 bundle exec rake canvas:compile_assets                                                                                                            328.6s
------                                                                                                                                                                                                      
 > [10/10] RUN COMPILE_ASSETS_NPM_INSTALL=0 bundle exec rake canvas:compile_assets:                                                                                                                         
#14 10.40 /home/docker/.gem/gems/soap4r-ruby1.9-2.0.5/lib/soap/mapping/encodedregistry.rb:150: warning: constant ::Fixnum is deprecated                                                                     
#14 10.40 /home/docker/.gem/gems/soap4r-ruby1.9-2.0.5/lib/soap/mapping/encodedregistry.rb:216: warning: constant ::Fixnum is deprecated                                                                     
#14 11.60 working in 4 processes                                                                                                                                                                            
#14 11.61 --> Starting: 'css:styleguide'                                                                                                                                                                    
#14 11.61 --> creating styleguide
#14 11.62 --> Starting: 'doc:api'
#14 11.62 --> Starting: 'js:gulp_rev'
#14 11.91 yarn run v1.19.1

...{removed for the sake of brevity}...

#14 67.99 Done in 10.63s.
#14 68.02 --> Finished: 'css:compile' in 11.13626479999948
#14 68.02 --> Finished: 'css:compile' in 11.24s
#14 68.04 working in 4 processes
#14 68.05 --> Starting: 'js:webpack_development'
#14 68.05 --> Building DEVELOPMENT webpack bundles
#14 68.05 --> Starting: 'js:webpack_production'
#14 68.05 --> Building PRODUCTION webpack bundles
#14 68.29 yarn run v1.19.1
#14 68.30 yarn run v1.19.1
#14 68.53 $ gulp rev 1> /dev/null & NODE_OPTIONS="--max_old_space_size=8192" webpack --color
#14 68.53 $ NODE_ENV=production gulp rev && NODE_ENV=production NODE_OPTIONS="--max_old_space_size=8192" webpack --color
#14 69.30 [05:03:07] Using gulpfile /usr/src/app/gulpfile.js
#14 69.30 [05:03:07] Starting 'rev'...
#14 69.73 [05:03:08] Finished 'rev' after 425 ms
#14 70.05 (node:175) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
#14 70.05 (Use `node --trace-deprecation ...` to show where the warning was created)
#14 83.39 (node:206) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
#14 83.39 (Use `node --trace-deprecation ...` to show where the warning was created)
#14 244.2 Killed
#14 244.7 error Command failed with exit code 137.
#14 244.7 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
#14 325.5 Killed
#14 325.8 error Command failed with exit code 137.
#14 325.8 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
#14 327.0 rake aborted!
#14 327.0 Parallel::UndumpableException: RuntimeError: Error running js:webpack_production: 
#14 327.0 ABORTING
#14 327.0 /usr/src/app/lib/tasks/js.rake:17:in `block (2 levels) in <top (required)>'
#14 327.0 /usr/src/app/lib/tasks/canvas.rake:78:in `block (6 levels) in <top (required)>'
#14 327.0 /usr/src/app/lib/tasks/canvas.rake:12:in `log_time'
#14 327.0 /usr/src/app/lib/tasks/canvas.rake:81:in `block (5 levels) in <top (required)>'
#14 327.0 /home/docker/.gem/gems/parallel-1.20.0/lib/parallel.rb:507:in `call_with_index'
#14 327.0 /home/docker/.gem/gems/parallel-1.20.0/lib/parallel.rb:477:in `process_incoming_jobs'
#14 327.0 /home/docker/.gem/gems/parallel-1.20.0/lib/parallel.rb:459:in `block in worker'
#14 327.0 /home/docker/.gem/gems/parallel-1.20.0/lib/parallel.rb:450:in `fork'
#14 327.0 /home/docker/.gem/gems/parallel-1.20.0/lib/parallel.rb:450:in `worker'
#14 327.0 /home/docker/.gem/gems/parallel-1.20.0/lib/parallel.rb:441:in `block in create_workers'
#14 327.0 /home/docker/.gem/gems/parallel-1.20.0/lib/parallel.rb:440:in `each'
#14 327.0 /home/docker/.gem/gems/parallel-1.20.0/lib/parallel.rb:440:in `each_with_index'
#14 327.0 /home/docker/.gem/gems/parallel-1.20.0/lib/parallel.rb:440:in `create_workers'
#14 327.0 /home/docker/.gem/gems/parallel-1.20.0/lib/parallel.rb:380:in `work_in_processes'
#14 327.0 /home/docker/.gem/gems/parallel-1.20.0/lib/parallel.rb:283:in `map'
#14 327.0 /usr/src/app/lib/tasks/canvas.rake:74:in `block (4 levels) in <top (required)>'
#14 327.0 /usr/src/app/lib/tasks/canvas.rake:73:in `each'
#14 327.0 /usr/src/app/lib/tasks/canvas.rake:73:in `block (3 levels) in <top (required)>'
#14 327.0 /usr/src/app/lib/tasks/canvas.rake:72:in `block (2 levels) in <top (required)>'
#14 327.0 /home/docker/.gem/gems/rake-13.0.3/exe/rake:27:in `<top (required)>'
#14 327.0 Tasks: TOP => canvas:compile_assets
#14 327.0 (See full trace by running task with --trace)
------
executor failed running [/bin/sh -c COMPILE_ASSETS_NPM_INSTALL=0 bundle exec rake canvas:compile_assets]: exit code: 1

can't add item (upload file ) on canvas course

I'm using docker, I try to upload file in Add Item to .
An error occurred that "Failed to Create new Item"
.
error from Console " POST http://10.110.3.110:8900/files_api?on_duplicate=rename 500 xhr.js:178 (Internal Server Error)"
.
and log on docker-canvas_app_i is "10.80.175.33 - - [15/Jul/2020:10:30:26 +0000] "POST /api/v1/folders/3/files HTTP/1.1" 200 835 "http://10.110.3.110:8900/courses/1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36 Edg/83.0.478.61"
10.80.175.33 - - [15/Jul/2020:10:30:26 +0000] "POST /files_api?on_duplicate=rename HTTP/1.1" 500 94 "http://10.110.3.110:8900/courses/1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36 Edg/83.0.478.61"
"
.
Can help me?

PermissionError: [Errno 13] Permission denied - Failed to execute script docker-compose

I was following the steps for "Docker Canvas for Integration Testing", and below is as far as I got in a virtualenv environment.

(python3test) jrb1099@cs400labs:~/docker-canvas$ git clone https://github.com/ubc/docker-canvas.git docker-canvas
Cloning into 'docker-canvas'...
remote: Enumerating objects: 34, done.
remote: Counting objects: 100% (34/34), done.
remote: Compressing objects: 100% (23/23), done.
remote: Total 113 (delta 15), reused 30 (delta 11), pack-reused 79
Receiving objects: 100% (113/113), 37.43 KiB | 7.49 MiB/s, done.
Resolving deltas: 100% (52/52), done.
(python3test) jrb1099@cs400labs:~/docker-canvas$ docker-compose up -d db
Building with native build. Learn about native build in Compose here: https://docs.docker.com/go/compose-native-build/
docker-canvas_db_1 is up-to-date

The first two steps went as planned, but when i tried to run
"docker-compose run --rm app bundle exec rake db:create db:initial_setup"
I get this error,

(python3test) jrb1099@cs400labs:~/docker-canvas$ docker-compose run --rm app bundle exec rake db:create db:initial_setup
Building app
Traceback (most recent call last):
File "docker-compose", line 3, in
File "compose/cli/main.py", line 80, in main
File "compose/cli/main.py", line 192, in perform_command
File "compose/metrics/decorator.py", line 18, in wrapper
File "compose/cli/main.py", line 949, in run
File "compose/cli/main.py", line 1413, in run_one_off_container
File "compose/project.py", line 670, in up
File "compose/service.py", line 363, in ensure_image_exists
File "compose/service.py", line 1127, in build
File "docker/api/build.py", line 160, in build
File "docker/utils/build.py", line 30, in tar
File "docker/utils/build.py", line 49, in exclude_paths
File "docker/utils/build.py", line 215, in rec_walk
File "docker/utils/build.py", line 215, in rec_walk
File "docker/utils/build.py", line 185, in rec_walk
PermissionError: [Errno 13] Permission denied: '/home/jrb1099/docker-canvas/.data/postgres'
[65827] Failed to execute script docker-compose

I was wondering if I am doing anything wrong or if there is an easy fix to this problem.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.