Rabbit-Company / Passky-Server

Server for Passky (password manager)
https://passky.org
GNU General Public License v3.0
166 stars 22 forks source link

Empty sqlite DB after install #50

Open ComputingFroggy opened 4 months ago

ComputingFroggy commented 4 months ago

Describe the bug I've followed instructions at https://github.com/Rabbit-Company/Passky-Server/blob/main/docs/installation/shared-hosting.md but once done. There's no sqlite DB file created. Once I get to the Health tab of my passky server. The passky.db file is created and is empty. The Health tab indicates "API can't connect with a database." ... which is quite logic as it is empty.

To Reproduce Steps to reproduce the behavior:

  1. Install following instructions at https://github.com/Rabbit-Company/Passky-Server/blob/main/docs/installation/shared-hosting.md
  2. Empty datase

Expected behavior I would expect the installation to work with a sqlite DB created and working.

Desktop (please complete the following information):

** Server : PHP 8.3

zigazajc007 commented 4 months ago

Hello,

Documentation for Shared-Hosting does not mention cron task, that takes care for creating tables in a database.

Once Passky Server is deployed execute /cron.php API endpoint.

image

You can create a cron task that will execute this API endpoint every minute.

ComputingFroggy commented 4 months ago

That worked ! Why running this cron every minute ?

zigazajc007 commented 3 months ago

That worked ! Why running this cron every minute ?

The tasks behind a cron.php will only get executed once per day. So it is completely safe to call it every minute or even spam the /cron.php api endpoint.