-
Bug
-
Resolution: Fixed
-
Should have
-
None
-
3
-
Dev Tools
Composer permission to 'app' user are lost when containers are removed and re-created. This happens at any time docker uses docker-compose down && docker-compose up commands. (Might happen automatically when some systems are shutdown)
> make dev > docker-compose exec -u app php-fpm composer licenses // display packages licenses > make down && make up > docker-compose exec -u app php-fpm composer licenses // fails bash: /app/bin/composer: Permission denied
WordPress container (php-fpm) can't run with user 'app', it runs with root (this constraint comes from the usage of phusion-baseimage). Every time we re-create a container, it mounts its files as root, and runs scripts in /etc/my_init.d. When it runs 20_install_wordpress.sh, it detects a wordpress installation and so skips all permissions fixes usually executed on first run.
'app' user is created after composer install (php_install_composer executed in php-fpm Dockerfile, add_user executed in entrypoint) , so we can't solve this before entrypoint.
Tasks:
- Run composer permissions fixes before wordpress installation check