Git Product home page Git Product logo

docker's Introduction

Vagrant and Docker setup for Twine

Virtual OS: Ubuntu 14.04 (Trusty) x64 With Packages:

  • Apache
  • PHP
  • phpPgAdmin
  • Curl
  • OAuth
  • Mongo
  • Prince
  • Python
  • Flask
  • PostgreSQL
  • R + Rserve

Requirements:

Guide:

  1. Download and install software from Requirements
  2. Create a folder named 'twineapp/' and clone this repository (twineapp/docker).
  3. Clone / copy in the twine repos and datasets
    3.1. Clone 'siv-v3' github repository into 'twineapp/docker/docker/web/src/siv-v3/' directory (~55MB)
    3.2. Clone 'api-data' github repository into 'twineapp/docker/docker/web/src/siv-v3/api-data/' directory (~0.3MB)
    3.3. (optional) Clone 'documentation' github repository into 'twineapp/documentation/' directory
    3.4. Copy twine postgresql build to 'twineapp/docker/docker/postgresql/src/' directory (~83MB)
    3.5. (optional) Copy twine mongodb build to 'twineapp/docker/docker/mongo/src/' directory (~288MB) 3.6. (optional) Clone 'enketo-express' github repository to 'twineapp/docker/docker/enketo/src/' directory (~6.1MB)
  4. Run terminal, go into 'twineapp/docker/', and execute the command 'vagrant up'. This will download the base box of ubuntu (~35MB), and bring up the twine vm

Working with the twine vagrant:

  • "vagrant up" starts the virtual machine
  • "vagrant suspend" suspends the vm, this is normally how you would end your work session
  • "vagrant halt" shuts down the vm, you would do this to autoload additional db patches for example
  • "vagrant reload" is equivelent to a halt and up, and should be run after changes to the vagrant repo. Before a reload, delete the siv_% dbs (you can run siv.drop.sql in phpmyadmin to do this)
  • "vagrant destroy" completely removes the vm from your machine. You would do this to save disk space if you won't be working on twine for a while, or to do a full rebuild after significant changes to the vagrant repo
  • command reference: http://docs.vagrantup.com/v2/cli/index.html

Working with the twine docker:

  • "docker ps" shows list of running docker containers
  • "docker inspect DOCKER_IMAGE_NAME" shows container details, including local IP

Notes:

PHP Docs:

  • To setup phpdoc and dependencies run in the web container: sudo /docker/src/scripts/phpdoc-setup.sh
  • To generate autodocs for the Twine API run in the web container: /docker/src/scripts/phpdoc-build.sh
  • Docs available at: http://192.168.50.5/siv-v3/docs/
  • these are copied into the documentation repo at documentation/api/app/

VM Passwords

  • rockmongo username:password are admin:admin
  • postgres username:password are admin:admin
  • SSH into any of the docker containers with root:password

Known issues

  • Hardware virtualization. Issues have been reported in Windows 7 when hardward virtualization was not enabled in the system bios. http://www.virtualbox.org/manual/ch10.html
  • Permissions Issues There have been issues on Windows systems when the project code has been cloned and run from folders which do not have sufficient permissions for the application to run on the Host system causing issues inside the vagrant with permissions.

docker's People

Watchers

James Cloos avatar  avatar

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.