From 371899180b8f8886119fb9f07fbd4bbcba91f4df Mon Sep 17 00:00:00 2001 From: Superkooka Date: Sun, 28 Mar 2021 16:40:53 +0200 Subject: [PATCH] Initial commit ! --- README.md | 7 +++++++ Vagrantfile | 19 +++++++++++++++++++ src/main.cr | 1 + 3 files changed, 27 insertions(+) create mode 100644 README.md create mode 100644 Vagrantfile create mode 100644 src/main.cr diff --git a/README.md b/README.md new file mode 100644 index 0000000..d5a842e --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +vagrant up +vagrant ssh + +cd /vagrant +crystal run src/main.cr + +vagrant halt \ No newline at end of file diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 0000000..5322f72 --- /dev/null +++ b/Vagrantfile @@ -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 diff --git a/src/main.cr b/src/main.cr new file mode 100644 index 0000000..8a035e9 --- /dev/null +++ b/src/main.cr @@ -0,0 +1 @@ +puts "Hellow World !"