Create docker compose file

I have different ruuning services on docker container and I want to manage multi application.I have a license server and I am trying to connect licese server to the other service.I cretaed a docker-compose.yml ;

version: “3.8”
services:
license:
build: .
image: “isoftmam/license-service:0.1”
networks:
sdnet:
driver: bridge
ipam:
driver: default

When I run docker-compose up command in my project , it create new dockerfile container and run then stopped.The main issue is why is getting stopped after runnning container.I dont want automatically stop service.Any idea on this issue ?