Brightspace / sample-LTI-WHMIS-quiz

A simple LTI quiz
Apache License 2.0
4 stars 3 forks source link

Vagrantfile and Dockerfile #1

Closed rschick closed 9 years ago

rschick commented 9 years ago

Adds a Dockerfile for building the app as a docker container, and a Vagrantfile for launching a vm to test out the container.

j3parker commented 9 years ago

Huh, neat!

rschick commented 9 years ago

I stole this code from cabinet, I'll look into why they use the phusion image.

rschick commented 9 years ago

Here's a link to an explanation about the phusion base Vagrant image: http://phusion.github.io/baseimage-docker/

rschick commented 9 years ago

I updated the Vagrant file so now it just runs the app and exposes it on port 55555. Added build.sh to build the docker container and push it to the repository.

rschick commented 9 years ago

I just realized I need to set the SITE_URL and other config vars - hold off on merging until I get these figured out. I think I'll just allow them to come from environment vars.

omsmith commented 9 years ago

re: phusion - regardless of the contents of that article, vagrant isn't docker though? Doesn't super matter, was just curious - but the answer to my question appears to be:

  • We provide 2 virtual CPUs by default, so that the boxes can make better use of multicore hosts.
  • We provide more RAM by default: 1 GB.
  • We provide a bigger virtual hard disk: around 40 GB.
  • We use LVM so that partitioning is easier.
  • On the Ubuntu 12.04 version, our default kernel version is 3.13 (instead of 3.2), so that you can use Docker out-of-the-box.
  • The memory cgroup and swap accounting are turned on, for some Docker features.
  • Chef is installed via the Ubuntu packages that they provide, instead of via RubyGems. This way the box doesn't have to come with Ruby by default, making the environment cleaner.

So mostly it has slightly different defaults, the most important ones likely being moot for 14.04.

rschick commented 9 years ago

Sorry yeah wrong link, the vagrant box description is here: https://github.com/phusion/open-vagrant-boxes

j3parker commented 9 years ago

I'm not sure who the "owner" of this is; I'm good with you two deciding if this should be merged. If there is org permission lameness I can be the one to click the button.

rschick commented 9 years ago

I don't have permission to merge this.