-
Notifications
You must be signed in to change notification settings - Fork 1
/
Vagrantfile
executable file
·37 lines (33 loc) · 1.43 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.box_check_update = true
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.provider "virtualbox" do |vb|
vb.gui = false
vb.memory = 512
end
config.vm.provision "shell", inline: <<-SHELL
# sed 's|http://archive.ubuntu.com/ubuntu|http://mirror.amberit.com.bd/ubuntu-archive|g' -i /etc/apt/sources.list
apt-get update
apt-get install -y nginx
mkdir -p /etc/nginx/sites-enabled/
mkdir -p /etc/uwsgi/apps-enabled/
userdel -r deployer
useradd -m deployer
mkdir -p /home/deployer/.ssh
cp -rf /home/vagrant/.ssh/authorized_keys /home/deployer/.ssh/authorized_keys
chown deployer:deployer /home/deployer/ -R
sudo apt-get install -y libssl-dev libreadline-dev zlib1g-dev git \
build-essential checkinstall libncursesw5-dev libssl-dev \
libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev ccache gcc make
sudo mkdir /usr/local/pyenv
git clone https://github.com/pyenv/pyenv.git /usr/local/pyenv
mkdir -p /usr/local/pyenv/plugins
git clone https://github.com/pyenv/pyenv-ccache.git /usr/local/pyenv/plugins/pyenv-ccache
PYENV_ROOT=/usr/local/pyenv /usr/local/pyenv/bin/pyenv install 3.6.0
PYENV_ROOT=/usr/local/pyenv PYENV_VERSION=3.6.0 /usr/local/pyenv/bin/pyenv exec pip install virtualenv
apt-get clean
SHELL
end