Rails - Host blocked with temporary Qovery host and domain

Issues information

  • OS: Rails
  • databases: postgres
  • Programming language and version: ruby


After deploying my dockerized rails app, I get the following message:
“Blocked host: XXXXXXX.numa.sh
To allow requests to XXXXXXX.numa.sh make sure it is a valid hostname”

Could you help me? I think it has something to do with environment variables

Dockerfile content (if any)

# syntax=docker/dockerfile:1

FROM ruby:3.0.3

RUN apt-get update -qq && apt-get install -y nodejs postgresql-client

WORKDIR /myapp

COPY Gemfile Gemfile

COPY Gemfile.lock Gemfile.lock

RUN bundle install

COPY . .


# Configure the main process to run when running the image

CMD ["rails", "server", "-b", "", "-p", "3000"]

Hi @olivredel :slight_smile:

To make it works you need to declare that the temporary host and domain provided by Qovery is legit. To make it works you can create an environment variable alias and use the environment variable in your configuration file.

How to solve this issue

To solve this issue you need to:

  1. Add the MY_RAILS_APP_HOST environment variable in your config.hosts file. Commit your change and push it.

  2. Go to your environment variables settings

  1. Create an environment alias MY_RAILS_APP_HOST in Qovery.

  1. Redeploy your app to apply changes

Then you should be good. :slight_smile:

1 Like