Front End Errors Using Local Development Environment w/Flex Image

Hello,

I just updated my local development environment to utilize the latest commits from the OpenEMR master branch. Once I pulled down the code I “re-initialized” the environment using

docker-compose down -v
docker-compose up -d mysql # check that MySQL is up before continuing
docker-compose up -d # start phpmyadmin and openemr

Note: I am using the docker-compose configuration located at the root of the project.

When I browse out to http://localhost:8300, the login page appears but it’s not styled. Based on the FireFox web console, it looks like the front end assets (styles, js, etc) aren’t being built.

I parsed through the DevOps repo’s flex auto-configure file and was able to resolve the issue by running the following commands.

composer install
npm install --unsafe-perm
npm run build

I just wanted to check in to see if anyone else had encountered this issue. If not I can track it down after I’ve wrapped up some FHIR work.

Thanks!

Dixon Whitmire

@brady.miller just updated the flex docker, so hopefully that will help

Thanks @stephenwaite! I’ll circle back and will take a look.

Any reason you don’t want to run ./run_openemr.sh from container shell (sudo docker exec -it xxx /bin/bash)?

Thanks for the suggestion! I can give that a try, but there are a few caveats.
The script is being used as the container’s command, which means that cron and apache are running once the container is started up. If I wanted to re-run the script I would need to stop those processes first.

hi @dixonwhitmire ,

Likely means you have some shared volumes lingering, which will break things. If have left ‘docker volume ls’ left then should do ‘docker volume prune’.

Also ensure don’t build openemr outside the docker (composer and npm), or this can break things. All that stuff needs to happen in the docker.

And recommend against running run_openemr.sh, since it was not built to run like that.

Would try this rebuild:

docker pull openemr/openemr:flex
docker-compose down -v
docker volume ls
docker volume prune
docker-compose up -d

(note no need to run mysql separately; there is a mechanism in the openemr docker to wait for mysql to be up)

And can follow the build via the docker log:

docker logs $(docker ps | grep _openemr | cut -f 1 -d " ")

oops,

wrong command above on the docker log (I pasted the php error log by mistake). Docker log is:

docker logs $(docker ps | grep _openemr | cut -f 1 -d " ")

(also corrected in above post)

Thanks @brady.miller