Skip to content

Instantly share code, notes, and snippets.

@LondonAppDev
Last active January 31, 2024 13:04
Show Gist options
  • Star 20 You must be signed in to star a gist
  • Fork 20 You must be signed in to fork a gist
  • Save LondonAppDev/d990ab5354673582c35df1ee277d6c24 to your computer and use it in GitHub Desktop.
Save LondonAppDev/d990ab5354673582c35df1ee277d6c24 to your computer and use it in GitHub Desktop.
byob Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "ubuntu/xenial64"
config.vm.network "forwarded_port", host_ip: "127.0.0.1", guest: 8080, host: 8080
config.vm.provision "shell", inline: <<-SHELL
# Update and upgrade the server packages.
sudo apt-get update
sudo apt-get -y upgrade
# Set Ubuntu Language
sudo locale-gen en_GB.UTF-8
# Install Python, SQLite and pip
sudo apt-get install -y python3-dev sqlite python-pip
# Upgrade pip to the latest version.
sudo pip install --upgrade pip
# Install and configure python virtualenvwrapper.
sudo pip install virtualenvwrapper
if ! grep -q VIRTUALENV_ALREADY_ADDED /home/vagrant/.bashrc; then
echo "# VIRTUALENV_ALREADY_ADDED" >> /home/vagrant/.bashrc
echo "WORKON_HOME=~/.virtualenvs" >> /home/vagrant/.bashrc
echo "PROJECT_HOME=/vagrant" >> /home/vagrant/.bashrc
echo "source /usr/local/bin/virtualenvwrapper.sh" >> /home/vagrant/.bashrc
fi
SHELL
end
@LondonAppDev
Copy link
Author

Please submit any course-related questions to the Udemy Q&A

This is so we have one central location where all of the knowledge about the course is located (questions asked and answered by students and instructors). This helps us address students’ questions faster and more efficiently - plus it helps students learn from each other.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment