Initialize': The Scheme Postgres Does Not Accept Registry Part: Postgres:@ (Or Bad Hostname) (Uri::Invalidurierror) with Docker

`initialize': the scheme postgres does not accept registry part: postgres:@ (or bad hostname?) (URI::InvalidURIError) with Docker

Rename your environment variable!

DATABASE_URL is reserved by Rails, and interpreted by ActiveRecord itself. I ran into the same issue.

Instead, use something like this:

    host:     <%= ENV['DB_HOST'] %>
password: <%= ENV['DB_PWD'] %>

Dockerise rails/redis/sidekiq/postgres project

Dockerfile is for building images, not for running daemons. The result of a docker build is a static thing (docker image). I recommend you to run redis directly from the docker-compose.yml

redis:
image: redis

radiofm:
(...)
depends_on: redis
(...)

Similar case for PostgreSQL. If you really what to setup your image for running daemons when container starts, you should tune CMD with a script or so.

Also, you can only use CMD just once.



Related Topics



Leave a reply



Submit