11Vagrant . configure ( "2" ) do |config |
2- box = "debian/bullseye64"
2+ box = "debian/bookworm64" # Debian 12
33
4- cpus = 2
4+ cpus = 1
55 memory = 768
66
77 config . vm . provider "virtualbox" do |vb |
@@ -27,13 +27,21 @@ Vagrant.configure("2") do |config|
2727
2828 db . vm . network "private_network" , ip : db_addr
2929 db . vm . network "forwarded_port" , guest : 5432 , host : 5432 , protocol : "tcp"
30+ db . vm . network "forwarded_port" , guest : 8080 , host : 8080 , protocol : "tcp"
3031
3132 db . vm . synced_folder "." , "/vagrant" , disabled : true
3233
3334 db . vm . provision "file" , source : "./scripts" , destination : "/tmp/scripts"
35+ db . vm . provision "file" , source : "./score-server" , destination : "/tmp/score-server"
3436
3537 db . vm . provision "shell" ,
3638 inline : <<-SCRIPT
39+ # Need both running here for Vagrant -- other platforms should ONLY have 2332
40+ sudo sh -c 'grep 2332 /etc/ssh/sshd_config || printf "Port 2332\n Port 22\n " >> /etc/ssh/sshd_config'
41+ sudo systemctl restart ssh
42+
43+ rm -rf /root/score-server
44+ sudo cp -r /tmp/score-server /root/score-server
3745 bash /tmp/scripts/init-db.sh
3846 SCRIPT
3947 end
@@ -55,6 +63,10 @@ Vagrant.configure("2") do |config|
5563
5664 team . vm . provision "shell" ,
5765 inline : <<-SCRIPT
66+ # Need both running here for Vagrant -- other platforms should ONLY have 2332
67+ sudo sh -c 'grep 2332 /etc/ssh/sshd_config || printf "Port 2332\n Port 22\n " >> /etc/ssh/sshd_config'
68+ sudo systemctl restart ssh
69+
5870 export team_name="Team-#{ i } "
5971 export db_addr='#{ db_addr } '
6072 bash /tmp/scripts/init.sh
0 commit comments