Would Polyscope work with Sail/Docker? #119
-
|
I wonder if Polyscope could potentially work with Sail/Docker, and how |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
I've been asking myself the same question and have been whipped up a quick proof-of-concept on that two days ago. My current {
"scripts": {
"setup": [
"cp .env.example .env",
"perl -i -pe 'BEGIN { $p = int(rand(1000)) + 8000 } s/^APP_PORT=.*/APP_PORT=$p/' .env",
"perl -i -pe 'BEGIN { $p = int(rand(1000)) + 13000 } s/^FORWARD_DB_PORT=.*/FORWARD_DB_PORT=$p/' .env",
"perl -i -pe 'BEGIN { $p = int(rand(1000)) + 16000 } s/^FORWARD_REDIS_PORT=.*/FORWARD_REDIS_PORT=$p/' .env",
"perl -i -pe 'BEGIN { $p = int(rand(1000)) + 5100 } s/^VITE_PORT=.*/VITE_PORT=$p/' .env",
"vendor/bin/sail up -d",
"vendor/bin/sail composer install --no-interaction --prefer-dist",
"vendor/bin/sail artisan key:generate",
"vendor/bin/sail artisan migrate:fresh --seed --force"
],
"archive": [
"vendor/bin/sail down --volumes --rmi local"
],
"run": [
{
"label": "Sail",
"command": "vendor/bin/sail up",
"autostart": true,
"runMode": "replace"
},
{
"label": "Vite",
"command": "vendor/bin/sail npm run dev",
"autostart": true,
"runMode": "replace"
},
{
"label": "Queue Worker",
"command": "vendor/bin/sail artisan queue:work --queue=default,marketing",
"autostart": true,
"runMode": "replace"
}
]
},
"preview": {
"command": "grep ^APP_PORT .env | cut -d= -f2 | xargs -I{} echo http://localhost:{}"
},
"copyGitignored": true
}As said: it's not ideal yet so very much open for improvements. Note that it does the following:
|
Beta Was this translation helpful? Give feedback.
I've been asking myself the same question and have been whipped up a quick proof-of-concept on that two days ago.
If you run it on your computer instead of a server it can work with sail.
I have it running with Sail and Docker locally with multiple workspace. It's not ideal and clicking the preview crashes the application, but it's a start.
My current
polyscope.jsonlooks as follows:{ "scripts": { "setup": [ "cp .env.example .env", "perl -i -pe 'BEGIN { $p = int(rand(1000)) + 8000 } s/^APP_PORT=.*/APP_PORT=$p/' .env", "perl -i -pe 'BEGIN { $p = int(rand(1000)) + 13000 } s/^FORWARD_DB_PORT=.*/FORWARD_DB_PORT=$p/' .env", "perl -i -pe 'BEGIN { $p = int(rand(100…