Updating APP_URL in worktree #2
Replies: 5 comments 1 reply
-
|
You can do that in the polyscope.json like this: {
"scripts": {
"setup": [
"sed -i '' \"s|^APP_URL=.*|APP_URL=https://$(basename \"$PWD\").test|\" .env",
],
"archive": []
}
} |
Beta Was this translation helpful? Give feedback.
-
|
I know we can use |
Beta Was this translation helpful? Give feedback.
-
|
Sharing my setup with Valet and MySQL. FYI I had to run {
"scripts": {
"setup": "sed -i '' \"s|^APP_FOLDER=.*|APP_FOLDER=$(basename \"$PWD\")|\" .env && sed -i '' \"s|^APP_URL=.*|APP_URL=http://$(basename \"$PWD\").myapp.test|\" .env && sed -i '' \"s|^QUEUE_CONNECTION=.*|QUEUE_CONNECTION=sync|\" .env && php artisan migrate --force && valet link $(basename \"$PWD\").myapp",
"archive": "valet unlink && mysql -u root -e \"DROP DATABASE IF EXISTS \\`myapp_$(basename \"$PWD\")\\`\""
},
"preview": {
"url": "http://{{folder}}.myapp.test"
}
} |
Beta Was this translation helpful? Give feedback.
-
|
I'm using {
"scripts": {
"setup": [
"echo \"name: projectname-$(basename $(pwd))\" > .ddev/config.local.yaml",
"ddev start -y",
"ddev artisan migrate --seed"
],
"archive": [
"ddev delete -Oy"
]
},
"preview": {
"url": "http://projectname-{{folder}}.ddev.site"
}
}
|
Beta Was this translation helpful? Give feedback.
-
|
Thanks everyone for the feedback. I initially tried using the {{folder}} placeholder in the setup scripts and that didn't work. It seems like that would be a good thing to add. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
When I create a new worktree - how am I supposed to update the APP_URL in the new .env file?
Beta Was this translation helpful? Give feedback.
All reactions