manyfold
manyfold copied to clipboard
fix issues in default unRAID template
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
-
Go to Unraid CA
-
Pull Manyfold template; fill in env variables
-
Scroll down to pg URL string
-
default string postgresql://manyfold:password@db/manyfold?pool=5
-
replace: manyfold by "database_name" password by "your_secret_password" db by "postgresql_docker_label"/"static_IP_of_container"
-
do a quick sql statement to create user, pw, db and grant all permissions in postgres
-
(redis is not setup yet but appears to be unrelated)
-
spin up docker container and manifold pg_connection error occurs in logs attached
Expected behavior replace custom variables and enjoy manifold since the unraid template should provide a default "state" almost ready to use.
Screenshots
Desktop (please complete the following information):
- OS: fedora40, kde plasma
- Browser firefox
- Version 127
Additional context Putting this on here to document the current state of the unraid template provided via the CA plugin. On request of the maintainer fixes, changes, tests are done.
with quickly trying to spin up the manifold container i noticed following:
the default url is provided and includes the pool parameter: postgresql://manyfold:password@db/manyfold?pool=5
please verify that this is intended since a quick research " PGSQL does not provide connection pooling. it is usually handled by a connection pooling tool or middleware" using this string without the pool appears to work fine in the first moment.
however though with the current image ghcr.io/manyfold3d/manyfold:latest (tag:0.69.0) following error appears: PG::ConnectionBad: connection to server at "172.1.0.2", port 5432 failed: FATAL: database "db/production.sqlite3" does not exist (PG::ConnectionBad)
noticable about this is: docker label got translated to ip correctly port default 5432 is correct
the database "db/production.sqlite3" causes some inexplicable behavior. what does database mean in this context? since the defined database_name is in the connection string. in the manyfold docs the statement "PostgreSQL is the production database, though sqlite3 is used in dev" is found. Does this indicate a improper search for an sqlite3 database even though, manyfold tries to connect to pg?
thanks for response point out errors since i do make mistakes
regards feroxib
update to: pg connection error "db/production.sqlite3"
double double checked the connection url and noticed that i accidentally removed more than intended. (database_name & "?pool=5") edited it and works flawlessly.
however it might be good practice to check if a database got specified.
in this mistake the production.sqlite3 got added automatically and does not seem to make sense as a replacement in a pg connection url
I think it might be better to change the DATABASE_URL to use the separate DATABASE_HOST etc variables, that way there's less potential for error in editing the URL string
Updated template in https://github.com/manyfold3d/unraid-templates/commit/f1b430fc053f8023d76a0a12505ee20973b31258; not sure how quickly it will get pulled into CA though?
i will try to check and post a quick update if it did
I managed to make it work with the latest template using the bridge network and proving the IP of my PostgreSQL in the DATABASE_HOST variable, same for Redis.
But the PUID=99 and PGID=100 is missing so the container doesn't run as root and to get rid of this warning:
The WebUI URL is also causing some issue, I was getting a 301 redirect to http://[my_ip]:3214/users/sign_in, strangely if I hit http://192.168.1.91:3214 or http://192.168.1.91:3214/ it load and I'm redirected to http://192.168.1.91:3214/users/edit
I'll add them in; are the values you mentioned a sensible default value on unraid?
OK, PGID and PUID are added with those default values.
@cristiandeschamps I don't quite follow the difference with the URLs you're using... what's the one that doesn't work?
I'll add them in; are the values you mentioned a sensible default value on unraid?
just checked your template and everything seems to have updated.
yes PGID=99 and PUID=100 is a sensible default for the container
since unraid does not make full use of the users/groups approach of Linux the way to hand out permissions for a docker container is by using the user nobody(99) and the group users(100).
I am using unraid and I cannot get this docker to work. @Floppy What are you looking for in the DATABASE_HOST variable and REDIS_URL. I installed both of these dockers and used the local bridged IP's to no avail.
Please ignore my above comment. I eventually figured out IP for my redis instance needed to replace the second redis in the default. This was not helped that when opening the built in WebUI button from unraid brought me to a login screen that doesn't work.
Glad you got it worked out @HiJaredA 👍🏻
@Floppy You mentioned adding the PGID and PUID variables in, for some reason my instance hasn't seen that change. I've updated it a couple times since that comment but it hasn't sorted itself out. Do I need to do a clean reinstall of the docker?
Here is what I would do:
- stop docker container manyfold
- copy/paste all the environmental values (db host, user, pwd, etc) to a text editor
- copy path of where the files lived too
- remove docker container manyfold (- remove image yes)
- go to community applications section previous (there's a list of all the previously installed ones)
- delete manyfold template from previous section
- search for the template in CA Apps
- paste the environmental values
- set the same path as previously used
run and have fun
I think given the conversation and changes made so far, I think it looks like this is resolved? Feel free to reopen if there are still issues that need fixing.