Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database-host seems hardcoded to localhost #184

Open
Walter-o opened this issue Nov 11, 2023 · 3 comments
Open

Database-host seems hardcoded to localhost #184

Walter-o opened this issue Nov 11, 2023 · 3 comments

Comments

@Walter-o
Copy link

Walter-o commented Nov 11, 2023

Describe the bug
Taskcafe-web doesn't seem to handle database host values anymore.

Even following this guide's installation process doesn't work anymore: https://www.llewellynhughes.co.uk/post/installing-taskcafe/#install-taskcafe
Using the exact unmodified docker-compose.yml file in that guide also triggers this issue for me.
Expected behavior
I expected taskcafe-web to try and connect to taskcafe_db (the hostname) but instead it calls for 127.0.0.1 (localhost)

Screenshots / Live demo link
The taskcafe-web logs
image
The docker-compose.yml in use
image

Additional context
There is a possibility that taskcafe now expects the database to be ran on localhost but i can't seem to find any reasoning or explanation anywhere about this, the docker-compose files aren't even updated for this, so it's most likely a bug.

@Walter-o
Copy link
Author

I found the solution but it's the nightmare scenario.

The host values are all hardcoded over at /internal/config/config.go

The TASKCAFE_DATABASE_HOST parameter is only mentioned inside of the docker-compose.yml files,
suggesting it's basically ignored.

I'm really suggesting them to be moved over to a .env file so people can easily change them.

Also once i got further i encountered more errors that made me realize what happened.
The main github branch is not safe. There are small errors left and right, it looks like things that were meant for a dev branch got onto the main one.
Either way, i should have tried the source code from the releases first, despite what all online guides show.

@Walter-o
Copy link
Author

wait i didn't mean to close, i still think having an .env file would be a very good addition to people running everything cleanly containerized.

@Walter-o Walter-o reopened this Nov 11, 2023
@Walter-o
Copy link
Author

Workaround for the 0.3.2 release version: https://github.com/JordanKnott/taskcafe/releases/tag/0.3.2
is by modifying the hardcoded values in internal/commands/commands.go

I got it running now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant