From a1c27cc47d9a51631e28c112c65a87c2acb5f2b1 Mon Sep 17 00:00:00 2001 From: Daniel Uber Date: Mon, 24 May 2021 20:03:36 -0500 Subject: [PATCH] Update docker-compose.yml file to permit login (#13792) There was an issue seen with the HTTP Origin header not matching (the error unhelpfully reported localhost:3000 did not match localhost:3000). Change the APP_DOMAIN internally to localhost:3000 (which is what the user will in fact use, not rails), and since that breaks the http requests from the db seed and sidekiq containers, allow them to only check for a tcp connection instead of expecting a 200 response (sending requests to the disallowed host `rails` triggered a 403). Related to discussion in https://github.com/forem/forem/issues/4955 --- docker-compose.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 6f9ecdc1d..a440ba3f3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -20,7 +20,7 @@ services: RACK_TIMEOUT_WAIT_TIMEOUT: 10000 RACK_TIMEOUT_SERVICE_TIMEOUT: 10000 STATEMENT_TIMEOUT: 10000 - APP_DOMAIN: rails + APP_DOMAIN: localhost:3000 volumes: - .:/opt/apps/forem:delegated entrypoint: ["dockerize", "-wait", "tcp://db:5432", "-wait", "tcp://redis:6379", "-wait", "file:///opt/apps/forem/vendor/bundle/.bundle_finished", "-timeout", "2700s", "-wait-retry-interval", "10s"] @@ -89,7 +89,7 @@ services: DATABASE_URL: postgresql://forem:forem@db:5432/PracticalDeveloper_development volumes: - .:/opt/apps/forem:delegated - entrypoint: ["dockerize", "-wait", "tcp://db:5432", "-wait", "tcp://redis:6379", "-wait", "http://rails:3000", "-timeout", "2700s", "-wait-retry-interval", "20s"] + entrypoint: ["dockerize", "-wait", "tcp://db:5432", "-wait", "tcp://redis:6379", "-wait", "tcp://rails:3000", "-timeout", "2700s", "-wait-retry-interval", "20s"] command: ["bundle", "exec", "rake","db:seed"] sidekiq: @@ -108,7 +108,7 @@ services: DATABASE_URL: postgresql://forem:forem@db:5432/PracticalDeveloper_development volumes: - .:/opt/apps/forem:delegated - entrypoint: ["dockerize", "-wait", "tcp://db:5432", "-wait", "tcp://redis:6379", "-wait", "http://rails:3000", "-timeout", "2700s", "-wait-retry-interval", "20s"] + entrypoint: ["dockerize", "-wait", "tcp://db:5432", "-wait", "tcp://redis:6379", "-wait", "tcp://rails:3000", "-timeout", "2700s", "-wait-retry-interval", "20s"] command: ["bundle", "exec", "sidekiq","-c","2"] db: