diff --git a/deployments/test/docker-compose.yaml b/deployments/test/docker-compose.yaml index c5a5c92..8456b33 100644 --- a/deployments/test/docker-compose.yaml +++ b/deployments/test/docker-compose.yaml @@ -39,24 +39,23 @@ services: - 8082:8000 - 9092:9000 depends_on: - - customer-db - - customer-migration - - redpanda + customer-db: + condition: service_started + customer-migration: + condition: service_completed_successfully + redpanda: + condition: service_healthy networks: - test customer-migration: container_name: customer-migration - build: - context: ../../. - dockerfile: Dockerfile - target: test - command: - [ - "sh", - "-c", - 'migrate -source file://migrations -database "mongodb://test:test@customer-db:27017/admin?authSource=admin" up', - ] + image: alpine + command: migrate -source file://migrations -database "mongodb://test:test@customer-db:27017/admin" up + volumes: + - ../../migrations/test:/app/migrations:ro + - ../../tools/migrate:/usr/local/bin/migrate:ro + working_dir: /app depends_on: - customer-db networks: @@ -105,17 +104,18 @@ services: networks: - test healthcheck: - test: ["CMD-SHELL", "rpk cluster health | grep -E 'Healthy:.+true' || exit 1"] - interval: 15s - timeout: 3s + test: rpk cluster health | grep -q 'Healthy:.*true' + interval: 2s + timeout: 2s retries: 5 start_period: 5s console: tty: true + container_name: customer-console image: docker.redpanda.com/redpandadata/console:v2.2.4 - entrypoint: /bin/sh - command: -c "echo \"$$CONSOLE_CONFIG_FILE\" > /tmp/config.yml; /app/console" + entrypoint: '' + command: sh -c 'echo "$$CONSOLE_CONFIG_FILE" > /tmp/config.yml && exec /app/console' environment: CONFIG_FILEPATH: /tmp/config.yml CONSOLE_CONFIG_FILE: | @@ -172,4 +172,4 @@ services: CONNECT_LOG_LEVEL: info networks: - test: \ No newline at end of file + test: diff --git a/tools/migrate b/tools/migrate old mode 100644 new mode 100755