SamR1/FitTrackee

Installation from Sources Install Issues

Opened this issue · 1 comments

Hello!

I want to start by saying I'm pretty new to a lot of what's needed to get Fittrackee running, so I understand if this question gets ignored for the questions being too basic.

I'm trying to install Fittrackee on a computer running Ubuntu from sources. I get to the step to initialize the database, and get the error "peer authentication failed for user "postgres"". I saw in this issue someone else mentioned having the problem, and the solution was to put the link to the database url in the .env file. The user ended up saying that worked for them, however I'm not sure where to find the database url? I see there's a default but I'm not sure how to tell if that's right or not? I'm also confused generally about how to setup the .env file, but have been slowly trying to input the info I can understand from the environmental variables section. I've changed it to a txt file so I can upload it here, in case that helps. I also set the password to just password to upload, but made it a stronger one on my end
env.txt

I also see part of initializing the database is "updating db/create.sql to change database credentials". I updated the password section, but I'm not sure if anything else in that file needs to be updated?

Any sort of help you can provide or info you can point me to would be greatly appreciated!

SamR1 commented

Hi,

The database URL contains database host, port and credentials:
postgresql://<USERNAME>:<PASSWORD>@<HOST>:<PORT>/<DATABASE>.

For instance, for dev environment, the script to initialize database is:

CREATE USER fittrackee WITH PASSWORD 'fittrackee';
CREATE SCHEMA fittrackee AUTHORIZATION fittrackee;
CREATE DATABASE fittrackee OWNER fittrackee;

So the corresponding value for DATABASE_URL is postgresql://fittrackee:fittrackee@localhost:5432/fittrackee

To allow and secure authentication, PostgreSQL config may be updated:
https://www.postgresql.org/docs/16/auth-methods.html
https://www.postgresql.org/docs/16/auth-password.html

If you'd like to try out FitTrackee before installing it in production, you can install it with Docker (note: Docker files are not suitable for production installation).