[bug]: DATABASE_URL path error on latest makeplane/plane-backend docker hub
Is there an existing issue for this?
- [X] I have searched the existing issues
Current behavior
I follow the tutorial on https://docs.plane.so/self-hosting
setting up the .env file on root and run,
docker compose -f docker-compose-hub.yml up
the container api keep returning error :
OperationalError: connection failed: FATAL: database "plane_prod:[pass]@[ip]:22846/plane_prod}" does not exist
Surprised by this checked my connection using DB client, and ok, this is my .env file
# Database Settings
PGUSER="postgres"
PGPASSWORD=[pass]
PGHOST=[host]
PGDATABASE="plane_prod"
DATABASE_URL=postgresql://${PGUSER}:${PGPASSWORD}@${PGHOST}/${PGDATABASE}
I tried to build it manually using :
services:
api:
container_name: api
build:
context: ./apiserver
dockerfile: Dockerfile.api
args:
DOCKER_BUILDKIT: 1
restart: always
command: ./bin/takeoff
env_file:
- .env
No error
Conclusion Seems there was error on the latest official images
Steps to reproduce
- clone repo
- set the postgres env to be remote env
- run the
docker compose -f docker-compose-hub.yml upto get the official images
Browser
Google Chrome
Version
Self-hosted
Hi @dkotama this error is caused due to the database not available in the postgres container can you check the variable POSTGRES_DB for the plane-db service in docker-compose-hub.yml.
Hi @dkotama this error is caused due to the database not available in the postgres container can you check the variable
POSTGRES_DBfor theplane-dbservice indocker-compose-hub.yml.
Since im using my external db for this, I think the plane db setting will not be used, correct ?
also, im using the unchanged plane-db setting from the master branch
Hi all, I can confirm this is certainly an issue...
beatworker | [2023-12-05 05:34:24,431: WARNING/MainProcess] connection failed: FATAL: database "plane:plane@plane-db/plane}" does not exist
Of interest is that the error from each container shows the same error, and specifically, it shows that closing brace in after the database name.
I don't know where to dig around trying to determine where it comes from, however, changing environments to use static values wherever I could manage it didn't seem to help in the slightest.
Starting plane-db on it's own obviously works so I can only assume it must be running but due to the incorrect name, all of the other containers are failing to see that particular database.
This is using a brand new installation, following the instructions from the website located at.. https://docs.plane.so/self-hosting
Hopefully this helps somebody work out the issue.
Running docker compose docker-compose-hub.yml config would show you:
DATABASE_URL: postgresql://plane:plane@plane-db/plane:plane@plane-db/plane}
Same goes for the REDIS_URL it shows:
REDIS_URL: redis://plane-redis:6379/:6379/}
I am not sure where the issue might come from, maybe parsing, but you can remove the default values of those two keys from the docker-compose-hub.yml file as a temporary fix.
Hi, can you check this issue in the latest release. Let us know if the issue still persists. Refer here for upgrading https://docs.plane.so/self-hosting/docker-compose
I think I have the same issue when I try to run Plane on my test computer with centos.
I followed the instruction to use the setup.sh to install and start the program, then I got the database does not exist error.
Since im using my external db for this, I think the plane db setting will not be used, correct ?
Here's the log in db container
@wangmengmike
As @smcpeck mentioned in his comment on #1019, setting the DATABASE_URL environment variable in the docker-compose.yml file to the following (removing the check/override of the default) did the trick to get rid of the error.
DATABASE_URL=postgresql://plane:plane@plane-db/plane
This issue has already been fixed. Please upgrade to the latest version.