Skip to content

Tables are not created in sqlite #138

@ishtarx

Description

@ishtarx

Hi, i installed servas using docker compose with the following compose configuration:

name: servas
services:
servas:
image: beromir/servas
container_name: servas
restart: unless-stopped
ports:
- "9099:80"
volumes:
- /home/docker/volumes/servas/database:/app/database
- /home/docker/volumes/servas/.env:/app/.env

and the following .env:

APP_NAME=Servas
APP_ENV=production
APP_KEY=
APP_DEBUG=true
APP_URL=http://192.168.1.5:9099

SERVAS_ENABLE_REGISTRATION=true
SERVAS_SHOW_APP_VERSION=true

SQLite

DB_CONNECTION=sqlite
DB_DATABASE=/app/database/database.sqlite
DB_FOREIGN_KEYS=true

after starting the container i did generate the key:

docker exec -it servas php artisan key:generate --force

INFO Application key set successfully.

then i restarted the container and opened the browser with the following url: http://192.168.1.5:9099/register

but i see the following error:

Illuminate\Database\QueryException
vendor/laravel/framework/src/Illuminate/Database/Connection.php:824

SQLSTATE[HY000]: General error: 1 no such table: sessions (Connection: sqlite, SQL: select * from "sessions" where "id" = Q52EmEuiMHpcBeevbaGvnEjmjI1ehB3S6ndopXac limit 1)
LARAVEL 12.38.1
PHP 8.4.14
UNHANDLED
CODE HY000
500
GET
http://192.168.1.5:9099/register
Exception trace
47 vendor frames

public/index.php

public/index.php:51

46
47$app = require_once DIR.'/../bootstrap/app.php';
48
49$kernel = $app->make(Kernel::class);
50
51$response = $kernel->handle(
52 $request = Request::capture()
53)->send();
54
55$kernel->terminate($request, $response);
56

Queries
// No queries executed
Headers
host
192.168.1.5:9099
accept-language
it-IT,it;q=0.8,en-US;q=0.5,en;q=0.3
accept-encoding
gzip, deflate
connection
keep-alive
upgrade-insecure-requests
1
accept
text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
cookie
remember_token=eyJyYW5kb20iOiJkOTRmZWE1Y2RlZDgxNDBhYTJlMyIsInVzZXIiOiIxIn0.Zg5ErZY28SRvrCDTYKSk7Uo7XoU; comicsDisplaySettings=FOLDER#FILE_NAME#ASC; i18n_redirected=en; uiShowCharts=true; uiChartType=area; csrftoken=8tGP61VBGpRM49KRHnVAbHhI26amPmTH; session=MTc2NTM4Mzk0M3xEWDhFQVFMX2dBQUJFQUVRQUFBal80QUFBUVp6ZEhKcGJtY01DQUFHZFhObGNrbEVCbk4wY21sdVp3d0ZBQU40ZUhnPXyh7DhQOWmZ8us4TjEooKyLMEVqHLveRp_lh_0HiJU4vg==; komga-remember-me=Y21kcDAwMSU0MGdtYWlsLmNvbToxNzk3NDQyODA0NTIyOlNIQTI1Njo2NjBlNThlYTJkYTk1MDRkMzk5MWNkOWFlNTJlYTY3MDljM2JiMTkxYzU5NjM2NzA3ODJlODZmMTVjMDBiNDg4; sessionid=cxd33605k1oadtmccggk6x2w9gu9n9nj
priority
u=0, i
user-agent
Mozilla/5.0 (X11; Linux x86_64; rv:143.0) Gecko/20100101 Firefox/143.0
Body
// No request body
Routing
controller
Laravel\Fortify\Http\Controllers\RegisteredUserController@create
route name
register
middleware
web, guest:web
Routing parameters
// No routing parameters

This is all i can see in the database:

$ sqlite3 volumes/servas/database/database.sqlite
SQLite version 3.37.2 2022-01-06 13:25:41
Enter ".help" for usage hints.
sqlite> .tables
migrations
sqlite> select * from migrations;
sqlite>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions