Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

fix: script for one click docker setup (#7762)

GORAKHNATH YADAV9c807340dc0f
diff --git a/README.md b/README.md
index 72ac7e0e3a..7f15ac2b01 100644
--- a/README.md
+++ b/README.md
@@ -78,36 +78,17 @@ Read more at [Hyperswitch docs](https://docs.hyperswitch.io/).
### 1. Local Setup
You can run Hyperswitch on your system using Docker compose after cloning this repository.
-
+We recommend using Docker Desktop (Or Orbstack) for Windows and Mac OS. On Linux, you can install Docker Engine directly.
```shell
git clone --depth 1 --branch latest https://github.com/juspay/hyperswitch
cd hyperswitch
docker compose up -d
+# This script verifies the setup and provides links to the individual components.
+scripts/docker_output.sh
```
+The next step is to [configure a connector][configure-a-connector] with the Hyperswitch Control Center and [try a payment][try-a-payment].
-Check out the [local setup guide][local-setup-guide] for a more details on setting up the entire stack or component wise. This takes 15-mins and gives the following output
-```shell
-[+] Running 2/2
-✔ hyperswitch-control-center Pulled 2.9s
-✔ hyperswitch-server Pulled 3.0s
-[+] Running 6/0
-
-✔ Container hyperswitch-pg-1 Created 0.0s
-✔ Container hyperswitch-redis-standalone-1 Created 0.0s
-✔ Container hyperswitch-migration_runner-1 Created 0.0s
-✔ Container hyperswitch-hyperswitch-server-1 Created 0.0s
-✔ Container hyperswitch-hyperswitch-web-1 Created 0.0s
-✔ Container hyperswitch-hyperswitch-control-center-1 Created 0.0s
-
-Attaching to hyperswitch-control-center-1, hyperswitch-server-1, hyperswitch-web-1, migration_runner-1, pg-1, redis-standalone-1
-```
-You've now setup Hyperswitch in your local machine. In order to verify that the server is up and running hit the health endpoint:
-```shell
-curl --head --request GET 'http://localhost:8080/health'
-```
-The expected response here is a `200 OK` status code. This indicates that the server and all of its dependent services are functioning correctly.
-Now, you can access the Control Center in your browser at `http://localhost:9000`.
-The next step is to configure a connector with the Hyperswitch Control Center and try a payment.
+Check out the [local setup guide][local-setup-guide] for more details on setting up the entire stack or component wise.
### 2. Deployment on cloud
@@ -144,7 +125,8 @@ You can experience the product by signing up for our [hosted sandbox](https://ap
[learning-resources]: https://docs.hyperswitch.io/learn-more/payment-flows
[local-setup-guide]: /docs/try_local_system.md
[docker-compose-scheduler-monitoring]: /docs/try_local_system.md#running-additional-services
-
+[configure-a-connector]: https://docs.hyperswitch.io/hyperswitch-open-source/account-setup/using-hyperswitch-control-center#add-a-payment-processor
+[try-a-payment]: https://docs.hyperswitch.io/hyperswitch-open-source/account-setup/test-a-payment
<a href="support-feature-requests">
<h2 id="support-feature-requests">Support, Feature requests & Bugs</h2>
diff --git a/scripts/docker_output.sh b/scripts/docker_output.sh
new file mode 100755
index 0000000000..80d178ca75
--- /dev/null
+++ b/scripts/docker_output.sh
@@ -0,0 +1,33 @@
+#! /usr/bin/env bash
+set -euo pipefail
+
+# Define the URL to check service availability (adjust HOST and PORT if needed)
+HOST="localhost"
+PORT="8080"
+SERVICE_URL="http://${HOST}:${PORT}/health"
+
+MAX_RETRIES=70
+RETRY_COUNT=0
+
+# Wait until the service is available or retries are exhausted
+while ! curl --silent --fail "${SERVICE_URL}" > /dev/null; do
+ if (( RETRY_COUNT >= MAX_RETRIES )); then
+ echo ""
+ echo "Service failed to start. Kindly check the logs."
+ echo "You can view the logs using the command: docker-compose logs -f <service name>"
+ exit 1
+ fi
+ printf "."
+ sleep 2
+ ((RETRY_COUNT++))
+done
+
+# Define ANSI 24-bit (true color) escape sequences for Light Sky Blue
+LIGHT_SKY_BLUE="\033[38;2;135;206;250m"
+RESET="\033[0m"
+
+# Print the service URLs with only the links colored
+echo -e "Control Centre running at ${LIGHT_SKY_BLUE}http://localhost:9000${RESET}"
+echo -e "App server running at ${LIGHT_SKY_BLUE}http://localhost:8080${RESET}"
+echo -e "Web-SDK running at ${LIGHT_SKY_BLUE}http://localhost:5252/HyperLoader.js${RESET}"
+echo -e "Mailhog running at ${LIGHT_SKY_BLUE}http://localhost:8025${RESET}"
\ No newline at end of file