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
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
fix: fixes the docker setup to clean up the scarf data (#7963)
GORAKHNATH YADAV4cbe2e46453b
diff --git a/README.md b/README.mdindex 3033263e57..fd211f3355 100644--- a/README.md+++ b/README.md@@ -42,11 +42,12 @@ Single API to access the payments ecosystem and its features1. [Introduction](#introduction)2. [Try Hyperswitch](#try-hyperswitch)-3. [Architectural Overview](#architectural-overview)-4. [Support, Feature requests & Bugs](#support-feature-requests)-5. [Our Vision](#our-vision)-6. [Versioning](#versioning)-7. [Copyright and License](#copyright-and-license)+3. [Architectural Overview](#architectural-overview)+4. [Community & Contributions](#community-and-contributions)+5. [Feature requests & Bugs](#feature-requests)+6. [Our Vision](#our-vision)+7. [Versioning](#versioning)+8. [Copyright and License](#copyright-and-license)<a href="#introduction"><h2 id="introduction">Introduction</h2>@@ -141,11 +142,17 @@ You can experience the product by signing up for our [hosted sandbox](https://ap[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>+<a href="community-and-contributions">+ <h2 id="community-and-contributions">Community & Contributions</h2></a>-For any support, join the conversation in [Slack](https://join.slack.com/t/hyperswitch-io/shared_invite/zt-2jqxmpsbm-WXUENx022HjNEy~Ark7Orw)+If you have any questions, feel free to drop them in our [Slack community](https://join.slack.com/t/hyperswitch-io/shared_invite/zt-2jqxmpsbm-WXUENx022HjNEy~Ark7Orw).++We welcome contributors from around the world to help build Hyperswitch. To get started, please read our [contribution guidelines](contributing-guidelines).++<a href="feature-requests">+ <h2 id="feature-requests">Feature requests & Bugs</h2>+</a>For new product features, enhancements, roadmap discussions, or to share queries and ideas, visit our [GitHub Discussions](https://github.com/juspay/hyperswitch/discussions)diff --git a/docker-compose-development.yml b/docker-compose-development.ymlindex 10b67da2ad..539bf47fd4 100644--- a/docker-compose-development.yml+++ b/docker-compose-development.yml@@ -323,8 +323,9 @@ services:ports:- "9000:9000"environment:- apiBaseUrl: http://localhost:8080- sdkBaseUrl: http://localhost:9050/HyperLoader.js+ - configPath=/tmp/dashboard-config.toml+ volumes:+ - ./config/dashboard.toml:/tmp/dashboard-config.tomlhyperswitch-web-sdk:build:diff --git a/docker-compose.yml b/docker-compose.ymlindex cc58c38e88..0683734e83 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -56,7 +56,11 @@ services:migration_runner:image: rust:latest- command: "bash -c 'cargo install diesel_cli --no-default-features --features postgres && cargo install just && just migrate'"+ command: >+ bash -c "+ curl -fsSL https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash &&+ cargo binstall diesel_cli just --no-confirm &&+ just migrate"working_dir: /appnetworks:- router_net@@ -65,11 +69,13 @@ services:environment:# format -> postgresql://DB_USER:DB_PASSWORD@HOST:PORT/DATABASE_NAME- DATABASE_URL=postgresql://db_user:db_pass@pg:5432/hyperswitch_db-+mailhog:image: mailhog/mailhognetworks:- router_net+ profiles:+ - full_setupports:- "1025:1025"- "8025:8025"@@ -91,6 +97,8 @@ services:condition: service_healthyredis-standalone:condition: service_healthy+ migration_runner:+ condition: service_completed_successfullylabels:logs: "promtail"healthcheck:@@ -454,11 +462,13 @@ services:- "5252:5252"networks:- router_net+ profiles:+ - full_setupdepends_on:hyperswitch-server:condition: service_healthyhyperswitch-web:- condition: service_healthy+ condition: service_startedenvironment:- HYPERSWITCH_PUBLISHABLE_KEY=placeholder_publishable_key- HYPERSWITCH_SECRET_KEY=placeholder_api_keydiff --git a/scripts/docker_output.sh b/scripts/docker_output.shdeleted file mode 100755index 80d178ca75..0000000000--- a/scripts/docker_output.sh+++ /dev/null@@ -1,33 +0,0 @@-#! /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 filediff --git a/scripts/poststart_hook.sh b/scripts/poststart_hook.shindex d1fa6a0109..3f8dd34a7f 100755--- a/scripts/poststart_hook.sh+++ b/scripts/poststart_hook.sh@@ -44,9 +44,9 @@ if [[ "$(echo "${HEALTH_RESPONSE}" | jq --raw-output '.error')" != 'null' ]]; thCURL_COMMAND+=("--data-urlencode" "status=${STATUS}"- "--data-urlencode" "error_type=${ERROR_TYPE}"- "--data-urlencode" "error_message=${ERROR_MESSAGE}"- "--data-urlencode" "error_code=${ERROR_CODE}"+ "--data-urlencode" "error_type='${ERROR_TYPE}'"+ "--data-urlencode" "error_message='${ERROR_MESSAGE}'"+ "--data-urlencode" "error_code='${ERROR_CODE}'")elseSTATUS="success"diff --git a/scripts/setup.sh b/scripts/setup.shindex c40c5365c9..79aa509731 100755--- a/scripts/setup.sh+++ b/scripts/setup.sh@@ -60,13 +60,16 @@ detect_docker_compose() {if command -v docker &> /dev/null; thenCONTAINER_ENGINE="docker"echo_success "Docker is installed."+ echo ""elif command -v podman &> /dev/null; thenCONTAINER_ENGINE="podman"echo_success "Podman is installed."+ echo ""elseecho_error "Neither Docker nor Podman is installed. Please install one of them to proceed."echo_info "Visit https://docs.docker.com/get-docker/ or https://podman.io/docs/installation for installation instructions."echo_info "After installation, re-run this script: scripts/setup.sh"+ echo ""exit 1fi@@ -74,14 +77,19 @@ detect_docker_compose() {if $CONTAINER_ENGINE compose version &> /dev/null; thenDOCKER_COMPOSE="$CONTAINER_ENGINE compose"echo_success "Compose is installed for $CONTAINER_ENGINE."+ echo ""elseecho_error "Compose is not installed for $CONTAINER_ENGINE. Please install $CONTAINER_ENGINE compose to proceed."+ echo ""if [ "$CONTAINER_ENGINE" = "docker" ]; thenecho_info "Visit https://docs.docker.com/compose/install/ for installation instructions."+ echo ""elif [ "$CONTAINER_ENGINE" = "podman" ]; thenecho_info "Visit https://podman-desktop.io/docs/compose/setting-up-compose for installation instructions."+ echo ""fiecho_info "After installation, re-run this script: scripts/setup.sh"+ echo ""exit 1fi}@@ -90,9 +98,11 @@ check_prerequisites() {# Check curlif ! command -v curl &> /dev/null; thenecho_error "curl is not installed. Please install curl to proceed."+ echo ""exit 1fiecho_success "curl is installed."+ echo ""# Check portsrequired_ports=(8080 9000 9050 5432 6379 9060)@@ -109,6 +119,7 @@ check_prerequisites() {fielseecho_warning "Neither nc nor lsof available to check ports. Skipping port check."+ echo ""breakfidone@@ -116,13 +127,16 @@ check_prerequisites() {if [ ${#unavailable_ports[@]} -ne 0 ]; thenecho_warning "The following ports are already in use: ${unavailable_ports[*]}"echo_warning "This might cause conflicts with Hyperswitch services."- read -p "Do you want to continue anyway? (y/n): " -n 1 -r+ echo ""+ echo -n "Do you want to continue anyway? (y/n): "+ read -n 1 -r REPLYechoif [[ ! $REPLY =~ ^[Yy]$ ]]; thenexit 1fielseecho_success "All required ports are available."+ echo ""fi}@@ -136,14 +150,20 @@ setup_config() {select_profile() {echo ""echo "Select a setup option:"- echo -e "1) Standard Setup: ${BLUE}[Recommended]${NC} Ideal for quick trial. Services included: ${BLUE}App Server, Control Center, Unified Checkout, PostgreSQL and Redis${NC}"- echo -e "2) Full Stack Setup: Ideal for comprehensive end-to-end payment testing. Services included: ${BLUE}Everything in Standard, Monitoring and Scheduler${NC}"- echo -e "3) Standalone App Server: Ideal for API-first integration testing. Services included: ${BLUE}App server, PostgreSQL and Redis)${NC}"+ echo -e "1) ${YELLOW}Standard Setup${NC}: ${BLUE}[Recommended]${NC} Ideal for quick trial."+ echo -e " Services included: ${BLUE}App Server, Control Center, Unified Checkout, PostgreSQL and Redis${NC}"+ echo ""+ echo -e "2) ${YELLOW}Full Stack Setup${NC}: Ideal for comprehensive end-to-end payment testing."+ echo -e " Services included: ${BLUE}Everything in Standard, Monitoring and Scheduler${NC}"+ echo ""+ echo -e "3) ${YELLOW}Standalone App Server${NC}: Ideal for API-first integration testing."+ echo -e " Services included: ${BLUE}App server, PostgreSQL and Redis)${NC}"echo ""local profile_selected=falsewhile [ "$profile_selected" = false ]; do- read -p "Enter your choice (1-3): " profile_choice- profile_choice=${profile_choice:-1}+ echo -n "Enter your choice (1-3): "+ read -n 1 profile_choice+ echocase $profile_choice in1)@@ -177,7 +197,7 @@ start_services() {$DOCKER_COMPOSE up -d;;full)- $DOCKER_COMPOSE --profile scheduler --profile monitoring --profile olap up -d+ $DOCKER_COMPOSE --profile scheduler --profile monitoring --profile olap --profile full_setup up -d;;esac}@@ -190,7 +210,6 @@ check_services_health() {while [ $RETRIES -lt $MAX_RETRIES ]; doif curl --silent --head --request GET 'http://localhost:8080/health' | grep "200 OK" > /dev/null; then- echo_success "Hyperswitch server is healthy!"print_access_info # Call print_access_info only when the server is healthyreturnfi@@ -228,7 +247,22 @@ print_access_info() {echo -e " • ${GREEN}${BOLD}Monitoring (Grafana)${NC}: ${BLUE}${BOLD}http://localhost:3000${NC}"fiecho ""- echo_info "To stop all services, run: $DOCKER_COMPOSE down"++ # Provide the stop command based on the selected profile+ echo_info "To stop all services, run the following command:"+ case $PROFILE in+ standalone)+ echo -e "${BLUE}$DOCKER_COMPOSE down${NC}"+ ;;+ standard)+ echo -e "${BLUE}$DOCKER_COMPOSE down${NC}"+ ;;+ full)+ echo -e "${BLUE}$DOCKER_COMPOSE --profile scheduler --profile monitoring --profile olap --profile full_setup down${NC}"+ ;;+ esac+ echo ""+ echo -e "Reach out to us on ${BLUE}https://hyperswitch-io.slack.com${NC} in case you face any issues."}# Main execution flow