Files
canvas-lms/script/docker_pull_image.sh
James Butters 741a725f52 update docker-compose to docker compose
[skip-crystalball]
[change-merged]
[build-registry-path=jenkins/canvas-lms/dockercomposeupdate]

Change-Id: Id8dac2c65a5b586fc5e419bbd83ecf565a71e33e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/357959
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
Build-Review: James Butters <jbutters@instructure.com>
Reviewed-by: Gergely Máté <gergely.mate@instructure.com>
2024-10-25 13:25:20 +00:00

43 lines
1.7 KiB
Bash
Executable File

#! /bin/bash
# Tired of building canvas?
# now you can add a `image: starlord.inscloudgate.net/jenkins/canvas-lms:master` to your docker-compose.local.yml
# then just `docker compose pull web`
# note if you do a `docker compose build` it will try to build everything
# but if you do a `docker compose up` it will just use the image you pulled down
# there is some weirdness to the way canvas is setup, that make this a little more
# difficult. We need to copy the Gemfile.lock from the container, and nuke stale
# volumes. You should be able to go while without pulling the new image down by
# running `bundle` and `yarn install` in your container after pulling
#
# ```yml
# version: '2.3'
# services:
# web: &WEB
# image: instructure/canvas-lms:master
# build:
# context: .
# guard:
# <<: *WEB
# jobs:
# <<: *WEB
# webpack:
# <<: *WEB
# ```
#
# On a new installation, you will need some config files. Do not copy contents of new-jenkins folder, just yamls.
#ccp docker-compose/config/*.yml config/
docker compose down
docker compose pull web
docker volume rm canvaslms_bundler canvaslms_canvas-docker-gems canvaslms_node_modules canvaslms_quizzes_node_modules canvaslms_yarn-cache canvaslms_generated_1 canvaslms_generated_2 canvaslms_generated_3
docker run --rm starlord.inscloudgate.net/jenkins/canvas-lms:master cat Gemfile.lock > Gemfile.lock
docker run --rm starlord.inscloudgate.net/jenkins/canvas-lms:master cat yarn.lock > yarn.lock
# If this is the first time you've set this up, you instead need to run this:
#docker compose run --rm web bash -c "bundle; bundle exec rake db:create db:initial_setup"
# If you are updating an existing installation, run this:
docker compose run --rm web bash -c "bundle; bundle exec rake db:migrate"