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

Start Mojolicious API application #886

Merged
merged 2 commits into from
Mar 6, 2019
Merged

Conversation

ssoriche
Copy link
Contributor

@ssoriche ssoriche commented Mar 5, 2019

When the container is done being built, start the Mojolicious API application instead of starting the Catalyst application (which will start as part of the Mojolicious application).

This container is using morbo in order to allow development of the API along side the running container.

The Mojolicious application waits for the database container to be started and for PostgreSQL to be accessible before starting, otherwise the API throws an error message that the database is inaccessible.

metacpan-api is now a Mojolicous app that bootstraps the Catalyst app
for routes that are not defined to Mojolicous. As such the command to
start the application has changed.
As there is now a PostgreSQL container that the api container talks to,
have to wait for the database container and application to be available
before starting the api.

The `wait-for-it.sh` script is the accepted way to wait for other
services to be available before starting.
@oalders oalders merged commit f81e413 into master Mar 6, 2019
@oalders oalders deleted the ssoriche/mojo-api-startup branch March 6, 2019 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants