Silverstripe Version: siverstripe/cms: 4.13.10
Question:
Hello, I know next-to-nothing about Silverstripe but as per the title, am trying to move an existing site to Azure Linux + Docker. I’ve gotten so far – the site is working except for the assets (.png
s and the like) but I need help to get those assets displayed.
I started by copying the database and deploying our site repo. to Azure but PHP 8 detected lots of duplicate class definitions so I pruned them out of various directories under vendor/
(mainly including _legacy
in the name) until the HTML, CSS and JS was all served. By the way, the composer.json
was arrived-at by some trial-and-error, since many combinations of package versions led to a fatal (uncatchable) PHP parse error. This is fixed in nikic/php-parser 5 apparently, but AFAICT no version of Silverstripe works with that.
The Windows site has a huge assets/
hierarchy but when I verbatim copy that to the Linux site (via tar
), it just 404ed on the home page. Nothing in app/.error_log
or anywhere else. With an empty assets/
directory, the site works but does not serve the assets, obviously. This is where I am stuck now. I presume the assets/
hierarchy is auto-generated somehow but just copying it, and the database, from one installation to another is not enough to make it work. What have I missed?
** composer.json **
{
"name": "silverstripe/installer",
"type": "silverstripe-recipe",
"description": "The SilverStripe Framework Installer",
"require": {
"php": ">=7.3.0",
"silverstripe/recipe-plugin": "^1.2",
"silverstripe/recipe-cms": "*",
"silverstripe-themes/simple": "~3.2.0",
"vulcandigital/silverstripe-hashupload": "^1.0",
"ryanpotter/silverstripe-cms-theme": "^3.4",
"vulcandigital/silverstripe-sendgrid": "^1.3",
"nikic/php-parser": "^4",
"jonom/focuspoint": "^3.0",
"silverstripe/googlesitemaps": "^2.1"
},
"require-dev": {
"phpunit/phpunit": "^5.7"
},
"extra": {
"project-files-installed": [
"app/.htaccess",
"app/_config.php",
"app/_config/mysite.yml",
"app/src/Page.php",
"app/src/PageController.php"
],
"public-files-installed": [
".htaccess",
"index.php",
"install-frameworkmissing.html",
"install.php",
"web.config"
]
},
"config": {
"process-timeout": 600
},
"prefer-stable": true,
"minimum-stability": "dev"
}
** .env **
SS_DATABASE_CLASS="MySQLDatabase"
SS_DATABASE_USERNAME="<<omitted>>"
SS_DATABASE_PASSWORD="<<omitted>>"
SS_ERROR_LOG="app/.error_log"
SS_DATABASE_SERVER="<<omitted>>"
SS_DATABASE_PORT="3306"
SS_DATABASE_NAME="<<omitted>>"
SS_ENVIRONMENT_TYPE="dev"