Why do deployments need APP_ENV=prod?
@liushuyu is already working on this.
Since May 30, 2024.
- Dominant language
- PHP
- Stars
- 115
- Forks
- 60
- Avg merge
- 14h 5m
- Merged PRs (30d)
- 1
Description
Dom kindly worked on #376, but it's not deploying to the lmms.io server. I had made a small code change earlier this week (d5bc47f), but first tested the code on the server directly, so didn't realize the webhook wasn't working (Github webhook says 200)
Troubleshooting/findings:
* I've temporarily toggled `OFF` deployment cleanup for debugging purposes.
* vi `/deploy.lmms/public_html/deploy-config.php`
* Search for `CLEAN_UP`
* **TODO:** Turn this back on! **Edit**: Done, it's back on.
* Redeploy from https://github.com/LMMS/lmms.io/settings/hooks/2803003?tab=settings
* Find repo cloned to `/tmp/deploy-master`
* Run the following command:
```bash
sudo bash # switch to root
sudo -u www-data bash # switch to www-data
export APP_ENV=prod
composer --no-ansi --no-interaction --no-progress --working-dir=/tmp/deploy-master install --no-dev --optimize-autoloader
```
* Test to see if `Artifacts.php` has been updated:
```bash
diff /tmp/deploy-master/lib/Artifacts.php /home/deploy/lmms.io/lib/Artifacts.php
```
Outdated
The error output:
```log
root@evs:/home/deploy/lmms.io# sudo -u www-data bash
www-data@evs:/home/deploy/lmms.io$ composer --no-ansi --no-interaction --no-progress --working-dir=/tmp/deploy-master install --no-dev --optimize-autoloader
[...]
Executing script cache:clear [KO]
[KO]
Script cache:clear returned with error code 255
!! Symfony\Component\ErrorHandler\Error\ClassNotFoundError {#86
!! #message: """
!! Attempted to load class "MakerBundle" from namespace "Symfony\Bundle\MakerBundle".\n
!! Did you forget a "use" statement for another namespace?
!! """
!! #code: 0
!! #file: "./vendor/symfony/framework-bundle/Kernel/MicroKernelTrait.php"
!! #line: 136
!! trace: {
!! ./vendor/symfony/framework-bundle/Kernel/MicroKernelTrait.php:136 { …}
!! ./vendor/symfony/http-kernel/Kernel.php:346 { …}
!! ./vendor/symfony/http-kernel/Kernel.php:762 { …}
!! ./vendor/symfony/http-kernel/Kernel.php:126 { …}
!! ./vendor/symfony/framework-bundle/Console/Application.php:190 { …}
!! ./vendor/symfony/framework-bundle/Console/Application.php:72 { …}
!! ./vendor/symfony/console/Application.php:175 { …}
!! ./vendor/symfony/runtime/Runner/Symfony/ConsoleApplicationRunner.php:49 { …}
!! ./vendor/autoload_runtime.php:29 { …}
!! ./bin/console:11 {
!! ›
!! › require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
!! ›
!! arguments: {
!! "/tmp/deploy-master/vendor/autoload_runtime.php"
!! }
!! }
!! }
!! }
!! 2024-05-30T01:12:30+00:00 [critical] Uncaught Error: Class "Symfony\Bundle\MakerBundle\MakerBundle" not found
!!
Script @auto-scripts was called via post-install-cmd
```
@DomClark @liushuyu any idea?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.