Initial commit !
This commit is contained in:
commit
371899180b
|
|
@ -0,0 +1,7 @@
|
||||||
|
vagrant up
|
||||||
|
vagrant ssh
|
||||||
|
|
||||||
|
cd /vagrant
|
||||||
|
crystal run src/main.cr
|
||||||
|
|
||||||
|
vagrant halt
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
Vagrant.configure("2") do |config|
|
||||||
|
config.vm.box = "ubuntu/bionic64"
|
||||||
|
config.vm.network "private_network", ip: "192.168.50.50"
|
||||||
|
config.vm.network "forwarded_port", guest: 8000, host: 8000
|
||||||
|
|
||||||
|
config.vm.provision "shell" do |s|
|
||||||
|
ssh_pub_key = File.readlines("#{Dir.home}/.ssh/id_rsa.pub").first.strip
|
||||||
|
s.inline = <<-SHELL
|
||||||
|
echo #{ssh_pub_key} >> /home/vagrant/.ssh/authorized_keys
|
||||||
|
echo #{ssh_pub_key} >> /root/.ssh/authorized_keys
|
||||||
|
|
||||||
|
curl -fsSL https://crystal-lang.org/install.sh | sudo bash
|
||||||
|
SHELL
|
||||||
|
end
|
||||||
|
config.vm.provider "virtualbox" do |v|
|
||||||
|
v.memory = 2048
|
||||||
|
v.cpus = 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
puts "Hellow World !"
|
||||||
Loading…
Reference in New Issue