Skip to content
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

Merged
merged 2 commits into from Jul 25, 2023

Conversation

Piumal1999
Copy link
Contributor

@Piumal1999 Piumal1999 commented Jul 14, 2023

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

@Piumal1999
Copy link
Contributor Author

Hi @ibacher, Could you please review and merge this?

test: ["CMD", "curl", "-f", "http://localhost:8080/openmrs"]
timeout: 5s
ports:
- 9000:8080
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

@ibacher ibacher Jul 25, 2023

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.

Copy link
Contributor Author

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")

Copy link
Contributor Author

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]

@Piumal1999 Piumal1999 requested a review from ibacher July 25, 2023 18:39
@ibacher ibacher merged commit a9f6fe4 into openmrs:main Jul 25, 2023
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants