diff --git a/.gitignore b/.gitignore index a16be3b..dbf3213 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .vagrant/** **/.DS_Store .data/** +.docker-sync/** diff --git a/Vagrantfile b/Vagrantfile index 0b96d89..e9339a0 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -32,7 +32,13 @@ Vagrant.configure("2") do |config| d.image = "quay.io/pterodactyl/vagrant-panel" d.create_args = ["-it", "--add-host=host.pterodactyl.local:172.18.0.1"] d.ports = ["80:80", "8080:8080", "8081:8081"] - d.volumes = ["#{vagrant_root}/code/panel:/srv/www:cached"] + + if ENV['FILE_SYNC_METHOD'] === 'docker-sync' + d.volumes = ["panel-sync:/srv/www:nocopy"] + else + d.volumes = ["#{vagrant_root}/code/panel:/srv/www:cached"] + end + d.remains_running = true d.has_ssh = true end diff --git a/docker-sync.yml b/docker-sync.yml new file mode 100644 index 0000000..cbde3a4 --- /dev/null +++ b/docker-sync.yml @@ -0,0 +1,7 @@ +version: "2" +syncs: + panel-sync: + sync_strategy: "native_osx" + src: "./code/panel/" + sync_excludes: [".idea", ".git", ".vagrant", "node_modules"] + host_disk_mount_mode: "cached" \ No newline at end of file diff --git a/scripts/deploy_app.sh b/scripts/deploy_app.sh index 40a0af9..dc3a982 100644 --- a/scripts/deploy_app.sh +++ b/scripts/deploy_app.sh @@ -7,6 +7,9 @@ cp /tmp/.deploy/pterodactyl.local.conf /etc/nginx/sites-available/pterodactyl.lo # Needed for FPM to start correctly. mkdir -p /run/php +# Disable xdebug on the CLI for _MASSIVE_ performance improvement +phpdismod -s cli xdebug + cd /srv/www chmod -R 755 storage/* bootstrap/cache @@ -21,7 +24,7 @@ fi sed -i "s/APP_ENV=.*/APP_ENV=local/" .env sed -i "s/APP_DEBUG=.*/APP_DEBUG=true/" .env -composer install --no-interaction --prefer-dist --no-suggest --no-scripts +composer install --no-interaction --prefer-dist --no-suggest --no-scripts --no-progress php artisan config:clear # Configure the cronjob diff --git a/setup.sh b/setup.sh index 6881110..8e098ff 100644 --- a/setup.sh +++ b/setup.sh @@ -6,3 +6,6 @@ vagrant plugin install vagrant-hostmanager cd $currentDirectory git clone https://github.com/pterodactyl/panel.git code/panel + +# sudo gem install docker-sync +# docker-sync start \ No newline at end of file