Skip to content

Commit c9cdd81

Browse files
committed
Add wait for the database to be up
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.
1 parent f6a205e commit c9cdd81

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ USER metacpan-api:users
2424

2525
EXPOSE 5000
2626

27-
CMD [ "carton", "exec", "morbo", "-l", "http://*:5000", "-w", "root", "./bin/api.pl"]
27+
CMD [ "./wait-for-it.sh", "db:5432", "carton", "exec", "morbo", "-l", "http://*:5000", "-w", "root", "./bin/api.pl"]

0 commit comments

Comments
 (0)