Skip to content

zero downtime update of cro web app #31

@melezhik

Description

@melezhik

Hi guys! First of all thanks for a great product you do.

I use cro for web application (https://mybf.io), my .cro.yaml file is that:

cro: 1
id: mbf
name: My Butterflies Web
entrypoint: app.raku
ignore:
  - .cache
  - .tom
  - articles
  - conf
  - cro.log
  - js

when I update any file not listed in ignore list it take cro awhile to restart an application to pick up changes, during this time my application is not available and my nginx server returns 502 error.

Any cure for that?

My web app command is:

nohub cro run > cro.log &

Snippet of app.raku running a cro web server is:

my Cro::Service $service = Cro::HTTP::Server.new:
    :host<0.0.0.0>, :port<2000>, :$application;

$service.start;

react whenever signal(SIGINT) {
    $service.stop;
    exit;
}

PS I know it could be hard to fix that on cro side, I am just interested in how someone would solve that

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions