New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the docker compose file used for creating pre-filled images #735
Conversation
Hi @ibacher, Could you please review and merge this? |
docker-compose-no-volumes.yml
Outdated
test: ["CMD", "curl", "-f", "http://localhost:8080/openmrs"] | ||
timeout: 5s | ||
ports: | ||
- 9000:8080 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason not to use 8080 as a default here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We used 8080 port to run the frontend (with yarn start --sources 'packages/esm-*-app/
). So the local backend was run on a different port.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right... I mean, for this use case, we don't even need an exposed port do we? I.e., this isn't a file that will be (or should be directly) used with tests. This is preparatory to that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But to check whether the initial data generation is completed, we need an exposed port. Isn't it?
(In order to use something similar to $(curl -s -o /dev/null -w ''%{http_code}'' http://localhost:8080/openmrs/login.htm)" != "200"
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the exposed port number to 8080 with [f572b1a]
Purpose
The purpose of this pull request is to create a docker-compose file that can be used to create pre-filled Docker images. The newly added docker-compose file enables the creation of a backend environment without using volumes. With this, we can write a Bamboo job that runs the backend environment, waits for data to be generated, and obtains a Docker image that includes the data.
I have named the file docker-compose-no-volumes.yml. Let me know if there are any suggestions for the file name.
Related talk thread: https://talk.openmrs.org/t/using-pre-filled-docker-images-for-running-e2e-tests/40003