Git Product home page Git Product logo

microservice's People

Contributors

andrea-mucci avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

microservice's Issues

Add command to run the `minos.template.EntrypointLauncher`

Initial version example:

DEFAULT_CONF_PATH = "tests/config.yml"


@app.command("start")
def start_microservice(conf: Optional[str] = typer.Argument(DEFAULT_CONF_PATH)):
    """Launch the microservice."""

    config = MinosConfig(path=Path(conf))
    try:
        launcher = EntrypointLauncher(config)
        launcher.launch()
    except Exception as e:
        typer.echo(f"Error starting microservice: {str(e)}")
        raise typer.Exit(code=1)

    typer.echo("Microservice is up and running!\n")

Run example:

poetry run microservice start

or

poetry run microservice start tests/config.yml

You can run commands directly example:

(microservice_template) ➜  microservice_template git:(typer) poetry shell
Spawning shell within /Users/vladyslavfenchak/.pyenv/versions/3.9.1/envs/microservice_templatemicroservice_template git:(typer) . /Users/vladyslavfenchak/.pyenv/versions/3.9.1/envs/microservice_template/bin/activate
(microservice_template) ➜  microservice_template git:(typer) microservice start                                                                     
Microservice is up and running!

(microservice_template) ➜  microservice_template git:(typer) microservice start tests/config.yml
Microservice is up and running!

Create Docker image

  • Create a Docker image to run the microservice.

  • Provide a docker-compose file to get the dependencies up.

    • Create database structure within postgres container
  • The Docker image must be small in size.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.