Skip to content

Instantly share code, notes, and snippets.

@mchelen
Last active March 31, 2020 06:10
Show Gist options
  • Save mchelen/296e474bf21d406078c1 to your computer and use it in GitHub Desktop.
Save mchelen/296e474bf21d406078c1 to your computer and use it in GitHub Desktop.
jsonresume registry server ubuntu 14.04
*~
registry-server/
.vagrant/

Usage Guide

This Vagrant image is designed for developers who will modify the source code. Therefore the repository is stored on the host system, allowing the user to commit & push code as normal.

Host requirements: Vagrant, Git

Tested with VirtualBox on Ubuntu 14.04

To work on your own fork, replace https://github.com/jsonresume/registry-server.git with git@github.com:YOURNAME/registry-server.git.

Host

git clone https://github.com/jsonresume/registry-server.git && \
cd registry-server && \
git submodule update --init --recursive && \
cd .. && \
vagrant up && \
vagrant ssh

Guest

cd /vagrant/registry-server/ && \
MONGOHQ_URL=mongodb://localhost:27017/jsonresume node server.js
#!/bin/bash
# https://github.com/jsonresume/registry-server
# run as vagrant user
# see readme for full usage instructions
sudo apt-get update
sudo apt-get install -y git npm mongodb redis-server
# mongo config
mongo localhost:27017/jsonresume --eval "db.resumes.insert({})"
echo MONGOHQ_URL=mongodb://localhost:27017/jsonresume >> .bashrc
# node setup
sudo ln -s /usr/bin/nodejs /usr/bin/node
cd /vagrant/registry-server
npm install
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provision :shell, path: "bootstrap.sh", privileged: false
config.vm.network "forwarded_port", guest: 5000, host: 5000
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"
# config.vm.provider "virtualbox" do |vb|
# # Don't boot with headless mode
# vb.gui = true
#
# # Use VBoxManage to customize the VM. For example to change memory:
# vb.customize ["modifyvm", :id, "--memory", "1024"]
# end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment