Skip to content

📦 A Vagrant box for VirtualBox to develop Django projects.

License

Notifications You must be signed in to change notification settings

transcode-de/django-vagrant-box

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django Vagrant Box

Vagrant box transcode/django Updates

A Vagrant box for VirtualBox to develop Django projects.

Base box is a Boxcutter Ubuntu box running Ubuntu Server 16.04 LTS.

Features

This Vagrant box comes with pre-installed packages that are useful for everyday Django development.

Programming Languages

Package Managers

Databases

Development Tools

Editors

Deployment

Other

  • An empty "django" virtual Python environment, automatically activated after login
  • A recreate command to recreate the current virtual Python environment (useful to uninstall all Python packages)
  • Glances 2.7.1, to monitor the box itself
  • wkhtmltopdf 0.12.2.4 with xvfb 1.18.4
  • lxml dependencies
    • libxslt1-dev 1.1.28
  • pillow dependencies
    • libtiff5-dev 4.0.6
    • libjpeg-dev 8c
    • zlib1g-dev 1.2.8
    • libfreetype6-dev 2.6.1
    • liblcms2-dev 2.6
    • libwebp-dev 0.4.4

Configuration

  • During the first login you will be asked for your full name and email address to be used for your Git commits
  • Git has already been configured with push.default = simple
  • A PostgreSQL database named "django" has already been created for you
  • User and password for the PostgreSQL database are both django (user is superuser)
  • PostgreSQL database name and user are also available as environment variables DB_NAME and DB_USER
  • APT is configured to use German Ubuntu mirror servers
  • An environment variable ENV=vagrant has been set, to be used in scripts etc.
  • Port 8000 on the guest will be forwarded to the same port on the host (used for the Django development web server)
  • Port 5050 on the guest will be forwarded to the same port on the host (used for pgAdmin4, needs to be started manually)
  • Port 61208 on the guest will be forwarded to the same port on the host (used for the Glances web server, runs in the background as a service)
  • Auto correction for port forwarding is enabled, so port numbers can be different - use the vagrant port command to display them
  • Timezone is set to Europe/Berlin

Installation

Download Vagrant 1.9.x and VirtualBox 5.1.x for your operating system and architecture, then install both.

Usage

Creating a new Vagrant box

To create and boot a new Vagrant box run:

$ vagrant init --minimal transcode/django
$ vagrant up

Now connect to the new box:

$ vagrant ssh

That's it! Now change your working directory to /vagrant and start working on your Django project!

Updating an existing Vagrant box

To check for updates for your existing transcode/django Vagrant box run:

$ vagrant box outdated

This command will show you if a new version of the box is available. (An update check is also performed every time you run vagrant up.)

If a new version is available, update the box:

$ vagrant destroy --force
$ vagrant box update

Warning

This will destroy all data in the Vagrant box! Only the files in /vagrant will be kept.

After a successful upgrade clean up the old Vagrant boxes:

$ vagrant box prune

Then boot and connect to the new Vagrant box:

$ vagrant up
$ vagrant ssh

Building and uploading a Vagrant box

This repository contains a Makefile with tasks to build, package and upload the Vagrant box to Amazon S3.

To build and upload a Vagrant box run:

$ git clone https://github.com/transcode-de/django-vagrant-box
$ make all

Code of Conduct

Everyone interacting in the django-vagrant-box project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the PyPA Code of Conduct.

License

Distributed under the BSD 3-Clause license.

Copyright (c) 2016-2017, Markus Zapke-Gründemann