Docker support for module development environment#12
Docker support for module development environment#12corneliouzbett wants to merge 4 commits intomainfrom
Conversation
|
@rkorytkowski check out this. Also, we need to disable the requirement to specify the |
rkorytkowski
left a comment
There was a problem hiding this comment.
It's looking better now. A few more adjustments are needed. Please see my comments.
README.md
Outdated
| OPENMRS_DB_REPLICAS=1 | ||
|
|
||
| # OMOD file name | ||
| OMOD_TARGET="queue-1.0.0-SNAPSHOT.omod" |
There was a problem hiding this comment.
Why don't you just commit .env in the repo instead of creating it on the fly?
README.md
Outdated
| Prepare the docker development environment by executing the following command; | ||
|
|
||
| ```bash | ||
| sh prepare-docker-env.sh |
There was a problem hiding this comment.
Ideally we don't have an additional step to prepare docker env and just have docker run, which prepares what is needed and builds.
There was a problem hiding this comment.
So the additional step is mainly for downloading the other required modules for this module to run. I suppose we could add to the entry point script for the dev image. How can I make sure we are not redownloading the same modules every time we run the Image?
There was a problem hiding this comment.
I would make it so that deploy_module.sh simply checks if a directory with modules exists. If it does then it does not re-downloads. If one needs to apply changes then the script could accept a parameter e.g. '-r' or '--refresh'. It's simple and it does not force to remember to run a different script.
docker-compose.yml
Outdated
| test: [ "CMD", "curl", "-f", "http://localhost:8080/openmrs" ] | ||
| timeout: 5s | ||
| volumes: | ||
| - ${PWD}/omod/target/${OMOD_TARGET}:/root/.OpenMRS/modules/${OMOD_TARGET} |
There was a problem hiding this comment.
It would be good to have just one volume e.g. ${PWD}:/openmrs/module/ and modify https://github.com/openmrs/openmrs-core/blob/master/startup.sh to do whatever is needed or better add deploy_module.sh in the openmrs-core dev image. We want to make it as simple as possible with no extra scripts to include in modules.
|
@corneliouzbett please let me know if anything needs clarification. |
Yes, I'd need clarification with the
Perhaps we could have a short session, let me know when you have free slot. |
|
Initial test DB schema will be added to core so don't worry about that. startup.sh needs to be modified in a way that supports module development. Basically scripts you added in this pull request need to be included in core. It is in startup.sh or deploy_module.sh as I suggested. It is to avoid having to add any scripts to individual modules rather have a script at hand to be used for any module. If you need further clarifications I'm available today in the next 4 hours or tomorrow in the same timeslot. Just ping me on slack. |
Initial docker support for the module development environment.
The goal is to be able to develop OpenMRS modules using a docker environment, with zero installations but just docker installed.
module.propertiesfile..envfile with declared configurations.