GitPod: Automate Dev Setup
During our hackweek, I decided to work on automating dev setup for canvas-lms
The setup involves rails, custom gems, node/yarn, data setup for dev and test data setup. The process can take upwards for half day(depends on other issues one may encounter for local setup). more details on quick start guide see https://github.com/instructure/canvas-lms/wiki/Quick-Start
What’s gitpod?
Gitpod is based on Kubernetes, GitHub, and the new Eclipse Theia project — a VS Code-like IDE that runs in modern browsers. You can think of it as an online IDE with deep GitHub integration (and soon other platforms), providing fully-featured development environments with a single click for any GitHub project, issue, branch or pull request.
Steps for enable project for gitpod
a) Create a custom dockerfile
I’ve used gitpod/workspace-postgres base image(canvas-lms recently upgraded to pg12). Install ruby, node, yarn and libraries
b) Create a setup file
Main steps are
bundle install and yarn install
bundle compile assets
create db for canvas_development and setup data for development
create db for canvas_test and setup data for running specs(non-selenium)
install performance tweaks
https://github.com/san-nat/canvas-lms/commit/dbdd4f2ac2662c82f6a9fb47d805b8495d80a75d