stages:
  - build
  - test
  - deploy

before_script:
  - docker info
  - docker-compose stop

build_test:
  stage: build
  script:
    - docker build -t my-docker-test-image ./BHCDatabase/

test:
  stage: test
  script:
    - docker run my-docker-test-image ./bin/rails t

build_deploy:
  stage: deploy
  script:
    - docker-compose -f ./BHCDatabase/docker-compose.yml build
    
deploy:
  stage: deploy
  script:
    - docker-compose -f ./BHCDatabase/docker-compose.yml up
stages:
  - build
  - test
  - deploy

before_script:
  - docker info
  - docker-compose -f ./BHCDatabase/docker-compose.yml stop

build_test:
  stage: build
  script:
    - docker build -t my-docker-test-image ./BHCDatabase/

test:
  stage: test
  script:
    - docker run my-docker-test-image ./bin/rails t

build_deploy:
  stage: deploy
  script:
    - docker-compose -f ./BHCDatabase/docker-compose.yml build
    
deploy:
  stage: deploy
  script:
    - docker-compose -f ./BHCDatabase/docker-compose.yml up
Stop previous production running before executing tests
Stop previous production running before executing tests