New microservices are deployed into the running platform by magicvarsh-infra-service via the Infrastructure → Deploy Service screen. It can deploy from a Docker image or, more commonly, by uploading a Spring Boot fat-JAR — the system builds a Docker image from the JAR, starts the container, and registers the service so the gateway, log viewer and API docs pick it up.
!
These rules are strict. A JAR that does not follow them will deploy but never register, or will be unreachable through the gateway.
Strict rules — creating the service
- Build a Spring Boot executable (fat) JAR with an embedded Eureka client — the deployer waits for the service to register with Eureka.
- Set
spring.application.name. It is used as the service name and to derive the gateway slug (the name with a trailing-serviceremoved, lower-cased), so it must be unique. - Configure
server.port(or let the deployer auto-read it). Internal ports stay on the Docker network; never expose the service directly to the host. - Give the service its own database schema with Flyway migrations under
src/main/resources/db/migration/V*.sql. - Rely on the gateway for auth: read the forwarded
X-User-*headers; do not re-validate the JWT in the service.
Strict rules — deploying a JAR
- Open Infrastructure and select the Deploy Service tab.
- Choose the JAR File (
.jar, required) — a Spring Boot executable JAR with an embedded Eureka client. - Service Name (optional) — leave blank to auto-read from
spring.application.name. - Port (optional) — leave blank to auto-read from
server.port. - Dashboard Group — defaults to
magic-varsh. - Add any Environment Variables (sent as
ENV_*parameters). - Select Deploy JAR and wait — building the image and starting the container can take up to two minutes on the first deploy. The service then registers with Eureka automatically.

Deploying from a Docker image
Alternatively, deploy a prebuilt image. The request carries the service name, image, port, hostPort, environment variables and a description.
POST /api/infra/deploy/jar # multipart: file, serviceName?, port?, group, ENV_*
POST /api/infra/deploy # JSON: name, image, port, hostPort, envVars, descriptionStrict rules — scaling & undeploying
- Scaling: scale up/down from the Instances view (
POST /api/infra/services/{name}/scale). You cannot scale below 1 instance. - Undeploy: only dynamically deployed JAR services can be undeployed (
DELETE /api/infra/services/{name}). The core, statically defined services are protected and cannot be removed this way.
!
Undeploying is guarded server-side: a service without the dynamic-JAR marker is refused. Do not try to remove core services through this screen — manage those through Docker Compose.