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

Remove "waiting behavior" from entrypoint, let docker restart the containers #212

Closed
richard-julien opened this issue Sep 7, 2019 · 1 comment
Assignees
Labels
feature use for describing a new feature to develop solved use to identify issue that has been solved (must be linked to the solving PR) technical improvement Technical refactor or improvement is needed
Milestone

Comments

@richard-julien
Copy link
Member

Problem to Solve

The current docker images implements a waiting for .... in order to wait for dependencies like Grakn / Elasticsearch. Its lead to code complexity and extra dependencies

Current Workaround

No

Proposed Solution

Let docker do its jobs by restarting container if they fail to start. To do that:

  • Group the schema, migration in the same process than the API.
  • Exit 1 the process if any error occurred during the bootstrap
  • Add a check in worker to test the API and fail to start if an error occurred (connect to rabbit or API)
@richard-julien richard-julien self-assigned this Sep 7, 2019
@richard-julien richard-julien added feature use for describing a new feature to develop technical improvement Technical refactor or improvement is needed labels Sep 7, 2019
@richard-julien richard-julien added this to the Release 1.2.0 milestone Sep 7, 2019
@richard-julien
Copy link
Member Author

Take a look in #191 implementation

SamuelHassine pushed a commit that referenced this issue Sep 13, 2019
#191, #212)

* Introducing new Alpine image and adapt schema and migrations to be part of the main process
* Yarn schema is no longer required
* Modification of the schema init for testing
* Bump dependencies versions and adapt healthcheck and logs
* Adapt worker script to check openCTI API before start. Exit the process if script have starting errors
* Align log message on domain reference
* Fix closeReadTx function by removing the log message introduce by previous commit
* Fix hadolint docker warnings
@SamuelHassine SamuelHassine added the solved use to identify issue that has been solved (must be linked to the solving PR) label Sep 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature use for describing a new feature to develop solved use to identify issue that has been solved (must be linked to the solving PR) technical improvement Technical refactor or improvement is needed
Projects
None yet
Development

No branches or pull requests

2 participants