Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
Updated the wait logic to poll and check instead.
  • Loading branch information
nhkhai committed May 3, 2024
1 parent 5540ecd commit fa7e118
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ COPY --from=builder /opt/app/target/*.jar /opt/app/*.jar
# Set the default command to run the Java application.
# The ENTRYPOINT instruction specifies the command that should be run. The CMD instruction provides default arguments to the ENTRYPOINT command.
# Start the PostgreSQL service, wait for it to start, then run the Java application via its Jar file.
ENTRYPOINT service postgresql start && sleep 5 && java -jar /opt/app/*.jar
ENTRYPOINT service postgresql start && while while ! curl http://localhost:5432/ 2>&1 | grep '52'; do sleep 1; done && java -jar /opt/app/*.jar

0 comments on commit fa7e118

Please sign in to comment.