This feature's goal is to improve the docker system in order to do not need to run several commands after using docker-compose up.
The modifications done are:
Improve the docker system in order to ease the launch of the work bench.
[x] Add a Health Check for the database container in the docker-compose in order to assure that the php artisan commands (migrate and db:seed) never fail. "Health-check" not possible as I thought in docker-compose version 3.7, instead loop until php artisan migrate command works.
[x] Add command for windows and linux in order to execute the needed commands when switching branches.
[x] Check node container and improve if needed. - Docker Node Service always running and building the app in order to be able to test the app changes without the need of installing npm in the host system. One can also enter the running container in order to test the application with the command npm run test.
[x] Some thing that said Jordi but I did not understand.. (Ask Jordi after finishing the other check points). As I understand it now it was to add the entrypoint to the docker-compose in order to execute it each "docker-compose up". [DONE] (Ask if I am right)
In order to test the feature there are two different approaches:
From Windows:
Run the switch-branch.bat script
Wait untill the database is innizializated and the migrations are done.
Test with "php artisan test" (php container): ALL Test should be correct.
From Linux/MacOS:
Run the switch-branch-linux.sh script
Wait untill the database is innizializated and the migrations are done.
Test with "php artisan test" (php container): ALL Test should be correct.
! Furthermore the node container has been modified in order to keep running and compile the react app every time a file is modified in the ./src/ folder.
Therefore there in no need no more to install npm in the host system, as all actions can be done in the node container (as npm run test).
This feature's goal is to improve the docker system in order to do not need to run several commands after using docker-compose up. The modifications done are: Improve the docker system in order to ease the launch of the work bench.
In order to test the feature there are two different approaches:
From Windows:
From Linux/MacOS:
! Furthermore the node container has been modified in order to keep running and compile the react app every time a file is modified in the ./src/ folder. Therefore there in no need no more to install npm in the host system, as all actions can be done in the node container (as npm run test).