Skip to content

Commit 0e9cd5d

Browse files
authored
Merge pull request #1122 from jc21/fixes-some-database-issues
Fixes some database issues on raspberry pi
2 parents b73a034 + d6d1c1a commit 0e9cd5d

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

backend/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ async function createDbConfigFromEnvironment() {
9595
client: 'sqlite3',
9696
connection: {
9797
filename: envSqliteFile
98-
}
98+
},
99+
useNullAsDefault: true
99100
}
100101
};
101102
if (JSON.stringify(configData.database) === JSON.stringify(newConfig)) {

docs/setup/README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,18 +122,15 @@ services:
122122
depends_on:
123123
- db
124124
db:
125-
image: ghcr.io/linuxserver/mariadb
125+
image: yobasystems/alpine-mariadb:latest
126126
restart: unless-stopped
127127
environment:
128-
PUID: 1001
129-
PGID: 1001
130-
TZ: "Europe/London"
131128
MYSQL_ROOT_PASSWORD: "changeme"
132129
MYSQL_DATABASE: "npm"
133130
MYSQL_USER: "changeuser"
134131
MYSQL_PASSWORD: "changepass"
135132
volumes:
136-
- ./data/mariadb:/config
133+
- ./data/mariadb:/var/lib/mysql
137134
```
138135

139136
_Please note, that `DB_MYSQL_*` environment variables will take precedent over `DB_SQLITE_*` var>
@@ -185,7 +182,8 @@ Here's an example for `sqlite` configuration as it is generated from the environ
185182
"client": "sqlite3",
186183
"connection": {
187184
"filename": "/data/database.sqlite"
188-
}
185+
},
186+
"useNullAsDefault": true
189187
}
190188
}
191189
}

0 commit comments

Comments
 (0)