XCMetrics
XCMetrics copied to clipboard
Stuck booting XCMetricsBackend when deploying using scheduled job
I encountered issue when deploying using docker-compoese
, following the documentation provided.
command: ["./XCMetricsBackend",
"queues",
"--scheduled",
"--env",
"production"]
Turns out that the command does not take exec
path. In my case I should change to
command: [ "queues",
"--scheduled",
"--env",
"production"]
After change it, in my xcmetrics service, it will stuck when booting and only produce this log
[ NOTICE ] Connecting to xcmetrics in postgresql as xcmetrics password length 15
[ INFO ] Using redis host redis and port 6379
[ INFO ] Starting scheduled jobs worker
I cannot connect to localhost:8080
using browser, even after 10 minutes waiting for the service to boot up.
Is there any change this is because the service boot command is overridden and the service in port 8080 is not started yet?
When I see docker documentation, command
property is used to override default command which in XCMetrics Dockerfile is
# Start the Vapor service when the image is run, default to listening on 8080 in production environment
ENTRYPOINT ["./XCMetricsBackend"]
CMD ["serve", "--auto-migrate", "--env", "production", "--hostname", "0.0.0.0", "--port", "8080"]