Skip to content

trantrungdng/vagrant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

vagrant

Pre-requirements:

Git

1. Install VirtualBox

2. Install Vagrant

3. Executing the vagrant command to build up env

  $ vagrant up

More info to work with Vagrant, visit documents

4. Open SSH connection

  $ vagrant ssh

5. Setting evn for yeoman in vagrant

  • What's in the box:
    • curl
    • RVM with Ruby 2.0.0 or later
    • NodeJs and NPM (included: Bower, Grunt)
    • Compass
    • PhantomJS
    • JPEGTRAN
    • Yeoman

6. Install Heroku

7. Heroku

  $ npm install -g generator-heroku
  $ yo heroku

8. Config Grunfile.js for heroku

  copy: {
    dist: {
      file: [{
        expand: true,
        dest: '<%= yeoman.dist %>',
        cwd: 'heroku',
        src: '*',
        rename: function (dest, src) {
          var path = require('path');
          if (src === 'distpackage.json') {
          return path.join(dest, 'package.json');
        }
        return path.join(dest, src);
      }]
    }
  }

9. Create app on Heroku

  $ cd dist/
  $ heroku apps:create

#Heroku Rename app:

  $ heroku rename name_app

10. Deployment app on Heroku

$ grunt build

#Push all files in dist folder on heroku:

  $ git push heroku master

Notes

  • Working folders: /home/vagrant/app

Get the site up and running

  • Start the server
  $ grunt serve
  • Shutdown server
  $ grunt halt

Known Issues:

If you encounter a problem concerning npm when you run "angular yo". Workarounds as follows:

  • Install Node.js with NVM (Node Version Manager)
  $ curl https://raw.githubusercontent.com/creationix/nvm/v0.10.0/install.sh | sh
  $ nvm install 0.10
  $ nvm use 0.10
  $ nvm alias default 0.10

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published