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
This commit is contained in:
Daniel Uber 2021-05-24 20:03:36 -05:00 committed by GitHub
parent d8cc793afe
commit a1c27cc47d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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: