Skip to content

Commit

Permalink
Make docker compose service restart fast
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillem committed Jan 30, 2024
1 parent 2259b11 commit 8277700
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@

### OS ###
.DS_Store


gpt
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,9 @@ install-tools:

lint:
golangci-lint run -v

up:
docker compose -f test/docker-compose.yml up --quiet-pull -d --wait

down:
docker compose -f test/docker-compose.yml down -v --remove-orphans
20 changes: 15 additions & 5 deletions test/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
# Configure the services needed for the integration tests.
# More information at https://docs.docker.com/compose/
version: "3.9"
version: "3"
services:
hello-world:
image: "hello-world:latest"
rabbitmq:
stop_grace_period: 100ms
image: rabbitmq:3.12-management
container_name: rabbitmq
ports:
- "5672:5672"
- "15672:15672"

healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 2s
timeout: 20s
retries: 100
start_period: 100ms

0 comments on commit 8277700

Please sign in to comment.