Replies: 2 comments 1 reply
-
Have you tried disabling the healthcheck test to make sure the error isn't coming from that one? |
Beta Was this translation helpful? Give feedback.
0 replies
-
The environment that you are giving to LabelStudio doesn't use the same username and password that you specify to the environment:
- DJANGO_DB=default
- POSTGRE_NAME=postgres
- POSTGRE_USER=postgres
- POSTGRE_PASSWORD=
- POSTGRE_PORT=5432
- POSTGRE_HOST=Postgres-LabelStudio
- LABEL_STUDIO_HOST=${LABEL_STUDIO_HOST:-}
- LABEL_STUDIO_COPY_STATIC_DATA=true environment:
- POSTGRES_HOST_AUTH_METHOD=trust
- POSTGRES_USER=${PG_USER}
- POSTGRES_PASSWORD=${PG_PASS}
- POSTGRES_DB=${PG_DB} Also, when |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I am trying to install Label Studio (latest image, v1.12.1, presumably) with Postgres (v16 alpine), using Docker compose. I already have an instance of Postgres running in another container for Authentik SSO.
When I run docker compose up for the Label Studio/Postgres compose file, I see this error in the Postgres logs:
2024-07-27 07:53:33.374 UTC [335] FATAL: role "postgres" does not exist
And similar in the Label Studio logs:
django.db.utils.OperationalError: connection to server at "Postgres-LabelStudio" (172.22.0.22), port 5432 failed: FATAL: role "postgres" does not exist
I have read this guide and also saw this example docker compose file, and set up my compose file based on that.
I don't necessarily need that version of Postgres, but figured I may as well use a reasonably-modern version. I note that the example compose file used v11.5; I tried that but had the same issue, so I don't think it's a Postgres version issue.
I have also tried just using the default Label Studio configuration (which uses SQLite instead of Postgres), and that worked fine. It's just getting it working with Postgres that I'm having problems with.
As mentioned above, I have previously installed Postgres for a completely different Docker service (Authentik). I was not sure if changing the container_name would be sufficient to have two separate instances of Postgres (one for Authentik, one for Label Studio) (I'm pretty new to Docker in general). While I have installed it for Authentik, I'll be honest in saying I don't really understand what I've done, so I may be doing all this the wrong way.
It seems to me that both instances of Postgres have different container names (Postgres-LabelStudio and authentik-postgresql-1), so I assume that's ok. Is it a problem that they're both using port 5432?
I also remember when I installed Postgres for Authentik, if I had files existing in certain folders, it wouldn't create the new database for Authentik.
Are there any specific folders that should be empty when I try to
docker compose up
my Label Studio compose.yml file?One last thing, just to complicate matters: I am using Traefik as a proxy. However, when I fired up Label Studio with the default configuration (SQLite, not Postgres), I also had Traefik enabled and that worked fine, so I don't think Traefik is the cause of my problems.
I am including my docker-compose-labelstudio.yml and docker-compose-authentik.yml files below. Could anyone suggest what I might be doing incorrectly please?
Thank you in advance.
Dave
Contents of
/home/david/dockerfilesNotOnNAS/labelstudio/dockercompose-labelstudio.yml
:...and contents of
/home/david/dockerfilesNotOnNAS/labelstudio/.env
:Contents of
/home/david/dockerfilesNotOnNAS/authentik/docker-compose-authentik.yml
:Beta Was this translation helpful? Give feedback.
All reactions