PrestaShop / PrestaShop/docker
[BUG] Failed to install bundle assets: target directory admin-dev does not exist
Nobody has claimed this yet.
- Dominant language
- Dockerfile
- Stars
- 281
- Forks
- 190
- PR merge metrics
- No merged PRs in 30d
Description
Prerequisites
- I understand and accept the project's code of conduct.
- I have already searched in existing issues and found no previous report of this bug.
Describe the bug and add attachments
env for PS_FOLDER_ADMIN has been passed to docker compose, but value not use in installer script, causing it to defaulted to "admin-dev"
* Launching the installer script...
* PrestaShopException: Failed to install bundle assets: 08:12:46 CRITICAL [console] Error thrown while running command "assets:install admin-dev --symlink=1". Message: "The target directory "/var/www/html/admin-dev" does not exist." ["exception" => Symfony\Component\Console\Exception\InvalidArgumentException { …},"command" => "assets:install admin-dev --symlink=1","message" => "The target directory "/var/www/html/admin-dev" does not exist."]
* The target directory "/var/www/html/admin-dev" does not exist.
* #0 /var/www/html/src/PrestaShopBundle/Install/Install.php(1239): PrestaShop\PrestaShop\Adapter\Bundle\AssetsInstaller->installAssets('admin-dev')
* #1 /var/www/html/install-e6a24f52caa606c699b6/controllers/console/process.php(342): PrestaShopBundle\Install\Install->finalize()
* #2 /var/www/html/install-e6a24f52caa606c699b6/controllers/console/process.php(200): InstallControllerConsoleProcess->processFinalize()
* #3 /var/www/html/install-e6a24f52caa606c699b6/classes/controllerConsole.php(139): InstallControllerConsoleProcess->process()
* #4 /var/www/html/install-e6a24f52caa606c699b6/index_cli.php(60): InstallControllerConsole::execute(17, Array)
* #5 {main}
Expected behavior
Bundle assets should be installed in PS_FOLDER_ADMIN
Function was called at https://github.com/PrestaShop/PrestaShop/blob/develop/src/PrestaShopBundle/Install/Install.php#L1251 and referenced to https://github.com/PrestaShop/PrestaShop/blob/develop/src/Adapter/Bundle/AssetsInstaller.php#L42
Steps to reproduce
Can reproduce by using PS_INSTALL_AUTO = 1, attached docker-compose.yml content to reproduce
services:
ps-db:
image: mariadb:lts
container_name: prestashop-mariadb
restart: unless-stopped
environment:
MARIADB_ROOT_PASSWORD: *mariadb_password*
MARIADB_DATABASE: prestashop
volumes:
- ./prestashop-db:/var/lib/mysql
networks:
- ps-net
ps-app:
image: prestashop/prestashop:9-fpm
container_name: prestashop-app
restart: unless-stopped
depends_on:
- ps-db
environment:
DB_SERVER: prestashop-mariadb
DB_USER: root
DB_PASSWD: *mariadb_password*
DB_PREFIX: abcd1234_
DB_NAME: prestashop
PS_INSTALL_AUTO: 1
PS_ERASE_DB: 1
PS_INSTALL_DB: 1
PS_DOMAIN: example.com
PS_LANGUAGE: en
PS_COUNTRY: MY
PS_FOLDER_ADMIN: admin-abcd1234
PS_FOLDER_INSTALL: install-abcd1234
PS_ENABLE_SSL: 0
ADMIN_MAIL: admin@email.com
ADMIN_PASSWD: *admin_password*
PS_HANDLE_DYNAMIC_DOMAIN: 0
volumes:
- ./prestashop-www:/var/www/html
- ./php.ini:/usr/local/etc/php/php.ini
networks:
- ps-net
ps-nginx:
image: nginx:alpine
container_name: prestashop-nginx
restart: unless-stopped
volumes:
- ./prestashop-www:/var/www/html
- ./nginx.conf:/etc/nginx/conf.d/default.conf
depends_on:
- ps-app
networks:
- ps-net
networks:
ps-net:
PrestaShop version(s) where the bug happened
9-fpm
PHP version(s) where the bug happened
8.4.15
Your company or customer's name goes here (if applicable).
No response
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.
Research direction
Start with the PS_INSTALL_AUTO flow in src/PrestaShopBundle/Install/Install.php and the asset installation call referenced in src/Adapter/Bundle/AssetsInstaller.php. Reproduce the failure with the supplied docker-compose.yml using PS_FOLDER_ADMIN set to a non-default directory. Done means the installer places bundle assets in that configured directory and no longer targets admin-dev.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, php
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100