mirror of
https://github.com/pterodactyl/development.git
synced 2025-12-11 04:38:32 -06:00
Fix the disasterous performance
Disables xdebug on the CLI to make tests run in a few seconds rather than taking minutes. Also adds support for using docker-sync for "native" performance in the docker container. If you choose to not use it, vagrant will mount the files using the standard osx method which is slower, but still within reasonable bounds.
This commit is contained in:
parent
0e2b4d85b5
commit
23fefe41cc
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
.vagrant/**
|
||||
**/.DS_Store
|
||||
.data/**
|
||||
.docker-sync/**
|
||||
|
||||
8
Vagrantfile
vendored
8
Vagrantfile
vendored
@ -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
|
||||
|
||||
7
docker-sync.yml
Normal file
7
docker-sync.yml
Normal file
@ -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"
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user