how to deal with exit code in detach mode in docker

Viewed 216

I'm trying to implement a CI&CD server using gitlab. my gitlab.ci config is something like this:

stages:  
  - deploy  
step-deploy-staging:
  stage: deploy       
  script:                
    - docker-compose up -d web

if I run my container with -d (detach) I can't understand the result of it because it will run on background. If i run docker-compose without detach mode, our gitlab pipeline never done

0 Answers
Related