mirror of
https://github.com/pterodactyl/development.git
synced 2025-12-11 04:38:32 -06:00
Merge pull request #1 from pterodactyl/feature/wings
add wings environment
This commit is contained in:
commit
7187be4781
16
Vagrantfile
vendored
16
Vagrantfile
vendored
@ -59,6 +59,21 @@ Vagrant.configure("2") do |config|
|
||||
SHELL
|
||||
end
|
||||
|
||||
config.vm.define "wings", autostart: false do |wings|
|
||||
wings.vm.hostname = "wings"
|
||||
|
||||
wings.vm.box = "bento/ubuntu-18.04"
|
||||
|
||||
wings.vm.synced_folder ".", "/vagrant", disabled: true
|
||||
wings.vm.synced_folder "#{vagrant_root}/code/wings", "/home/vagrant/go/src/github.com/pterodactyl/wings",
|
||||
owner: "vagrant", group: "vagrant"
|
||||
|
||||
wings.vm.network :forwarded_port, guest: 8080, host: 58080
|
||||
wings.hostmanager.aliases = %w(wings.local)
|
||||
|
||||
wings.vm.provision "provision", type: "shell", path: "#{vagrant_root}/scripts/provision_wings.sh"
|
||||
end
|
||||
|
||||
config.vm.define "docs" do |docs|
|
||||
docs.vm.hostname = "documentation"
|
||||
docs.vm.synced_folder ".", "/vagrant", disabled: true
|
||||
@ -78,6 +93,7 @@ Vagrant.configure("2") do |config|
|
||||
d.volumes = ["#{vagrant_root}/code/documentation:/srv/documentation:cached"]
|
||||
d.remains_running = true
|
||||
d.has_ssh = true
|
||||
d.privileged = true
|
||||
end
|
||||
|
||||
docs.vm.provision "deploy_files", type: "file", source: "#{vagrant_root}/build/configs", destination: "/tmp/.deploy"
|
||||
|
||||
32
scripts/provision_wings.sh
Normal file
32
scripts/provision_wings.sh
Normal file
@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
chown -R vagrant:vagrant /home/vagrant
|
||||
|
||||
echo "Install docker, go and some dependencies"
|
||||
apt-get -qq update
|
||||
apt-get -qq -o=Dpkg::Use-Pty=0 upgrade
|
||||
apt-get -qq -o=Dpkg::Use-Pty=0 install -y golang-go docker.io mercurial tar unzip make gcc g++ python
|
||||
|
||||
usermod -aG docker vagrant
|
||||
|
||||
echo "Setup GOPATH"
|
||||
echo "export GOPATH=/home/vagrant/go" >> /home/vagrant/.profile
|
||||
export GOPATH=/go
|
||||
echo 'export PATH=$PATH:$GOPATH/bin' >> /home/vagrant/.profile
|
||||
|
||||
echo "Install go dep"
|
||||
sudo -H -u vagrant bash -c 'go get -u github.com/golang/dep/cmd/dep'
|
||||
echo "Install delve for debugging"
|
||||
sudo -H -u vagrant bash -c 'go get -u github.com/derekparker/delve/cmd/dlv'
|
||||
|
||||
echo "Install ctop for fancy container monitoring"
|
||||
wget https://github.com/bcicen/ctop/releases/download/v0.7.1/ctop-0.7.1-linux-amd64 -q -O /usr/local/bin/ctop
|
||||
chmod +x /usr/local/bin/ctop
|
||||
|
||||
echo "cd /home/vagrant/go/src/github.com/pterodactyl/wings " >> /home/vagrant/.profile
|
||||
|
||||
echo " ------------"
|
||||
echo "Gopath is /home/vagrant/go"
|
||||
echo "The project is mounted to /home/vagrant/go/src/github.com/pterodactyl/wings"
|
||||
echo "Provisioning is completed."
|
||||
1
setup.sh
1
setup.sh
@ -9,6 +9,7 @@ vagrant plugin install vagrant-hostmanager
|
||||
cd $currentDirectory
|
||||
git clone https://github.com/pterodactyl/panel.git code/panel
|
||||
git clone https://github.com/pterodactyl/documentation.git code/documentation
|
||||
git clone https://github.com/pterodactyl/wings.git code/wings
|
||||
|
||||
# sudo gem install docker-sync
|
||||
# docker-sync start
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user