From b06c1b71830d4536b71009db812d85593aea09e5 Mon Sep 17 00:00:00 2001 From: Pedro Correa Date: Sat, 12 Jul 2025 17:15:21 -0300 Subject: [PATCH] :fire: removed project from docker compose --- README.org | 3 +++ cmd/app/main.go | 4 ++-- docker-compose.yml | 13 ------------- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/README.org b/README.org index 2c44afd..cf91abf 100644 --- a/README.org +++ b/README.org @@ -17,6 +17,9 @@ Run the project with both providers mocked: docker compose up #+end_src +The docker compose file is configured to build and run 3 dockers, 2 being the mocked providers (Stripe and Braintree), they're both were created using [[https://github.com/mrak/stubby4node][stubby4node]] and the project. +The main project will use port =8000= in your machine and the providers will use port =8001= and =8002= (this is mostly for running the main project outside docker). + In other terminal, make the request with hurl #+begin_src shell diff --git a/cmd/app/main.go b/cmd/app/main.go index a4a133f..8ba85d9 100644 --- a/cmd/app/main.go +++ b/cmd/app/main.go @@ -26,8 +26,8 @@ func main() { defer logger.Sync() providers := providers.NewUseProviders([]providers.Provider{ - providers.NewBraintreeProvider("http://"+getEnv("BRAINTREE_URL", "localhost:8001"), logger), - providers.NewStripeProvider("http://"+getEnv("STRIPE_URL", "localhost:8002"), logger), + providers.NewBraintreeProvider(getEnv("BRAINTREE_URL", "http://localhost:8001"), logger), + providers.NewStripeProvider(getEnv("STRIPE_URL", "http://localhost:8002"), logger), }, logger) paymentsService := service.NewPaymentService(providers) diff --git a/docker-compose.yml b/docker-compose.yml index 4709135..3e286af 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,17 +1,4 @@ services: - api-gateway: - build: - dockerfile: $PWD/Dockerfile - ports: - - "8000:8000" - environment: - PORT: 8000 - BRAINTREE_URL: stripe - STRIPE_URL: braintree - depends_on: - - stripe - - braintree - stripe: build: dockerfile: $PWD/Dockerfile-stubby -- 2.51.2