w

    wilsojb

    2 years ago
    Hello! 👋 I'm evaluating prefect server for a new project and I'm curious - what is the suggested way to deploy
    prefect server start
    where its not running in the foreground? I was expecting to find a
    -d
    option (similar to docker-compose). I'm sure this has been asked before - just looking to be pointed in the right direction! Thanks! 🙇
    Laura Lorenz (she/her)

    Laura Lorenz (she/her)

    2 years ago
    Hi! So there’s not really a super official way to do that with the prefect convenience CLI, certainly you could stick the whole
    prefect server start
    behind
    nohup
    or something though that doesn’t feel great. In general once people get out out of the base case that
    prefect server start
    provides we’ve been recommending people take a look at the docker compose file itself and taking it out to suit it to your needs (
    prefect server start
    really just does some environment variable interpolation before running
    docker-compose up
    on this docker compose file: https://github.com/PrefectHQ/prefect/blob/master/src/prefect/cli/docker-compose.yml). So in that case you could put that docker compose file somewhere and use docker-compose directly, including the
    -d
    . All that being said we are actively thinking of the best ways to expose deployment setup better.
    prefect server start
    quickly outgrew itself as we keep adding on more flags to it so we’re trying to find a good way to split the difference between people just taking a look at the UI and people actually deploying.
    w

    wilsojb

    2 years ago
    Hey @Laura Lorenz (she/her) - thanks for getting back to me so promptly! My gut told me that was the right approach. I'm already using docker compose for other services so that fits in very nicely.
    Pedro Machado

    Pedro Machado

    2 years ago
    +1 on using docker compose + config file and env variables possibly in a .env file