elamperti / OpenWebScrobbler

🎧 An open source web scrobbler for Last.fm
https://openscrobbler.com/
GNU General Public License v2.0
312 stars 36 forks source link

Improve readme section about local development #236

Closed silversonicaxel closed 4 days ago

silversonicaxel commented 2 weeks ago

I am interested in running locally the project. In order to do that I was trying to follow the README section. Since it is pretty "poor" I thought to improve it.

Current work in progress is intended to do that.

But I need some support from @elamperti

Can we try to fix it together?

I am trying to add all variables information and all commands to execute in order to have a running project.

I am at the stage that, react application is up and running, what is not working is the fetching of the lastfm user information

Screenshot 2024-06-28 at 10 52 10

and what seems to miss here is a php server to do that, and indeed a configuration for SQLITE_DB_PATH variable. Can you support on that?

elamperti commented 2 weeks ago

Hi, thanks for your interest in improving the docs, I appreciate it!

From what I see in your changes, you are trying to start the docker service directly using docker compose, but the whole project should start correctly with yarn start (which starts both the webserver and the docker service).

If the error persists using this method, check the network tab to see what happens with the calls to user.php, there should be enough information about what's failing. Let me know if you need more help!

silversonicaxel commented 2 weeks ago

I fixed the commands section and

<br />
<b>Warning</b>:  SQLite3::prepare(): Unable to prepare statement: 1, no such table: settings in <b>/var/www/html/api/v2/inc/database.php</b> on line <b>21</b><br />
<br />
<b>Fatal error</b>:  Uncaught Error: Call to a member function bindValue() on bool in /var/www/html/api/v2/inc/database.php:22
Stack trace:
#0 /var/www/html/api/v2/user.php(45): Database-&gt;get_settings('silversonicaxel')
#1 {main}
  thrown in <b>/var/www/html/api/v2/inc/database.php</b> on line <b>22</b><br />

this is the error I see from user.php call

elamperti commented 2 weeks ago

Considering it's complaining about the settings table being missing, there's probably some issue running the db migrations (not sure why). You can try removing the database directory in the repo, which contains the development db, and starting the project again (ideally using yarn start) should run the migration script when the sqlite-web container boots up.

If the container sqlite-web is up, you should be able to investigate the current state of the db on http://localhost:8080/

silversonicaxel commented 2 weeks ago
Screenshot 2024-06-30 at 10 09 24

settings table is there, but for some reason, I do not have any database folder in my repository. might it be the issue?

silversonicaxel commented 4 days ago

Fixed your comments!

elamperti commented 4 days ago

Thank you!