diff --git a/Makefile b/Makefile index 811c60296..e233e8cd8 100644 --- a/Makefile +++ b/Makefile @@ -227,7 +227,7 @@ bump-deps-full: check pull: @echo @echo "### Pulling images for docker-compose stack" - @docker-compose pull + @docker compose pull # The `compose-up` target is intended to build and create # all containers for the local Docker compose stack. @@ -237,7 +237,7 @@ pull: compose-up: @echo @echo "### Creating containers for docker-compose stack" - @docker-compose -f docker-compose.yml up -d --build + @docker compose -f docker-compose.yml up -d --build # The `compose-down` target is intended to destroy # all containers for the local Docker compose stack. @@ -247,7 +247,7 @@ compose-up: compose-down: @echo @echo "### Destroying containers for docker-compose stack" - @docker-compose -f docker-compose.yml down + @docker compose -f docker-compose.yml down # The `spec-install` target is intended to install the # the needed dependencies to generate the api spec. @@ -322,4 +322,4 @@ spec: spec-gen spec-version-update spec-validate lint: @echo @echo "### Linting Go Code" - @golangci-lint run ./... \ No newline at end of file + @golangci-lint run ./... diff --git a/docker-compose.yml b/docker-compose.yml index 349d0d34b..6cd534285 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,6 @@ version: '3' services: - # The `server` compose service hosts the Vela server and API. # # This component is used for processing web requests and @@ -16,7 +15,6 @@ services: context: . dockerfile: Dockerfile container_name: server - image: server:local networks: - vela environment: @@ -52,10 +50,12 @@ services: ports: - '8080:8080' depends_on: - - postgres - - redis - - vault - + postgres: + condition: service_healthy + redis: + condition: service_started + vault: + condition: service_started # The `worker` compose service hosts the Vela build daemon. # @@ -140,6 +140,11 @@ services: POSTGRES_USER: vela ports: - '5432:5432' + healthcheck: + test: ['CMD-SHELL', 'pg_isready'] + interval: 10s + timeout: 5s + retries: 5 # The `vault` compose service hosts the HashiCorp Vault instance. # @@ -161,4 +166,4 @@ services: - IPC_LOCK networks: - vela: \ No newline at end of file + vela: