Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/winsmith/vagrant-template
A small, easy template for new vagrant-based projects
https://github.com/winsmith/vagrant-template
Last synced: 13 days ago
JSON representation
A small, easy template for new vagrant-based projects
- Host: GitHub
- URL: https://github.com/winsmith/vagrant-template
- Owner: winsmith
- License: mit
- Created: 2016-01-12T16:19:59.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-12T16:45:26.000Z (almost 9 years ago)
- Last Synced: 2024-11-03T15:42:52.554Z (2 months ago)
- Language: Shell
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
.# Vagrant Template
Provides a very lightweight template for adding [Vagrant](http://vagrantup.com) to a project. Simply copy the `Vagrantfile`,
`provision.sh` and `requirements.txt` to your project and modify them to your desires. When you're done, run `vagrant up`.## Default Features
Should you not modify the files, `vagrant up` will create a machine that has
- Ubunty 14, 64 bit installed
- Ports 8080 and 8000 mapped to the outside world
- [fish](http://fishshell.com) installed as the default shell
- Python, `pip` and `virtualenv` available
- installs all apt-get packages in `packages.txt`
- installs all python packages in `requirements.txt`## Provisioning
- To install a Debian package during provisioning, add it to the `vagrant/packages.txt` file
- To install a Python package during provisioning, add it to the `requirements.txt` file
- To do other tasks during provisioning, edit the `vagrant/provision.sh`The provisioning process will automatically create a virtualenv for your `vagrant` user and activate it on login.
This way, you can install `pip` packages by `vagrant ssh`ing into the machine and running `pip install packagename` without
caring too much about the virtualenv (this is supposed to be a dev machine after all). Remember to add newly installed
packages to `requirements.txt` as well, so they will be installed the next time you or someone else re-provisions the machine.## Example: A lightweight Django development machine
Let's say you want to start a new Django project. Create an empty repository by forking this one or copying all the files
to a new repository. Then add your requirements to the various files:### `vagrant/packages.txt`
postgresql-9.3
libpq-dev### `requirements.txt`
# base requirements (strongly typed, no surprises here)
Django~=1.8.8
psycopg2~=2.6.1
# development requirements (we want the newest and greatest here)
django-nose
coverageNo other changes necessary. Run `vagrant up` and wait a few minutes for your machine to provision. The use `vagrant ssh`
to ssh into the machine, `cd vagrant` to switch directories to your development directory and (assuming you've already
put some Django code at this location) `python manage.py runserer 0.0.0.0:8000` to run your server.