diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7fd88e9..890b108 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,7 +33,8 @@ test-docker-ubuntu: - cd ubuntu - docker load -i postal-ubuntu-container.tar - docker-compose up -d - - docker-compose run postal run + - sleep 600 + - docker inspect postal | jq '.[].State.Health' after_script: - cd ubuntu - docker-compose rm -sfv diff --git a/ubuntu/docker-compose.yml b/ubuntu/docker-compose.yml index c6cf2f8..ab708d2 100644 --- a/ubuntu/docker-compose.yml +++ b/ubuntu/docker-compose.yml @@ -23,6 +23,11 @@ services: - POSTAL_LNAME=Cat - POSTAL_PASSWORD=SecretCatPassword - POSTAL_EMAIL=myemail@catsworld.com + healthcheck: + test: curl -sS http://127.0.0.1:5000 || exit 1 + interval: 5s + timeout: 10s + retries: 3 mysql: image: mariadb:10 container_name: postal_mysql