# Deployment Service

Manages the lifecycle of a deployment, which represents the automation of an ML model task within Media Magic.

The core entity is a deployment, but as a part of a deployment, there is also jobs, which are the individual tasks which make up a deployment.

## Run locally

This service can be ran locally using `$ make run-local`.

This will run a Postgres container, a Redis container, and the service itself, which is a Go process on the host, not in a Docker container.

## Prerequisites

* migrate: <https://github.com/golang-migrate/migrate>

## Integration tests

```bash
$  make tests.integration
```

## Protobuf definition

This service exposes a gRPC + Protobuf server, for certain endpoints/functions. You

The protobuf definition can be found in `./proto`, you can re-build the protobuf definitions `$ make build.proto`.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mediamagic.dev/product-docs/services/deployment-service.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
