title: How to run spring-boot application using GitLab runner?
body: <p>I have a spring-boot maven application I've been running locally as:</p>
  
  <pre><code>mvn spring-boot:run
  </code></pre>
  
  <p>I want to be able to run this in GitLab runner so that when I push the code to master, it automatically copies the latest up there and runs the application.</p>
  
  <p>My GitLab runner is configured in shell mode right now, and I have inside of the <code>.gitlab-ci.yml</code> file a deploy task that runs just that:</p>
  
  <pre><code>mvn spring-boot:run
  </code></pre>
  
  <p>The issue I am running into is after the application starts, I can see that it is running... but it never shows as success or completed. It just hangs there (because the terminal is still running when you execute that command?)</p>
  
  <p>Question is, is there an alternate set of commands I should be running to get my spring-boot application to update and run each time I push to master? What is it i should be putting into my <code>gitlab-ci.yml</code> (or other files). Note that I am not using docker or kubernetes... just shell.</p>
  
  <p>Sample gitlab CI:</p>
  
  <pre><code>run-deploy:
    stage: deploy
    script:
      - mvn $MAVEN_CLI_OPTS spring-boot:run 
  </code></pre>
  
  <p>Trying nohup with that also fails.
  <code>- nohup mvn $MAVEN_CLI_OPTS spring-boot:run &amp;</code></p>