sqlpage / SQLPage

Fast SQL-only data application builder. Automatically build a UI on top of SQL queries.
https://sql.datapage.app
MIT License
1.57k stars 89 forks source link

ERROR Configuration directory is not a valid directory #589

Closed accforgithubtest closed 3 weeks ago

accforgithubtest commented 3 weeks ago

Switching the version from lovasoa/sqlpage:v0.28.0 to lovasoa/sqlpage:main results in error which crashes the container.

Are there any expected breaking changes in the upcoming release ? Or are changes to existing configurations are needed before switching to main ?

Docker Compose

services:
  sqlpage:
    image: lovasoa/sqlpage:main
    container_name: sqlpage
    restart: always
    environment:
      DATABASE_URL: mysql://user:password@mysql:3306/testdb
      SQLPAGE_CONFIGURATION_DIRECTORY: /mnt/docker/volumes/sqlpage/sqlpage
    volumes:
      - /mnt/docker/volumes/sqlpage/stats:/var/www
      - /mnt/docker/volumes/sqlpage/sqlpage:/etc/sqlpage
    ports:
      - 8080
    depends_on:
      - mysql
    links:
      - mysql

Logs:

[2024-09-13T10:51:12.962Z ERROR sqlpage] Configuration directory is not a valid directory: "/mnt/docker/volumes/sqlpage/sqlpage"
Container stopped

Version information

lovasoa commented 3 weeks ago

SQLPage v0.29 will check that the configuration directory exists.

But your docker compose file seems broken, even for older versions: the configuration directory you give to SQLPage should be available to it (inside the docker container). In your case, if you are mounting your local configuration directory to /etc/sqlpage, then the configuration directory should be /etc/sqlpage. And since this is the default, you can remove the SQLPAGE_CONFIGURATION_DIRECTORY env variable altogether

accforgithubtest commented 3 weeks ago

Thanks for the reply, looks like I made a mistake with SQLPAGE_CONFIGURATION_DIRECTORY long time back, and has gone unnoticed until now. Apologies, and thanks for the reply !