FWIW, it would be nice to remove the need for database configuration, or an extra database, by using redis, couchbase, mongodb or other nosql databases, or better yet just store/persist the data in a json file that can be stored on a volume or NFS share. Configs will not change often enough to justify a full database with its added complexity and overhead.
I agree with this, it becomes a bit of a pain having to launch the containers in certain order unless I'm missing something?
A possible solution that may be quicker to implement is just base this around sqlite? That way the db and db-engine can just be part of same container and generally be invisible to user.
Has this been implemented? I can't seem to find any documentation or dev versions that have this.
+1 to this. A mysql database takes up 250mb+ to store the < 2kb of data required to make nginx-proxy-manager work. Absolutely nuts.
I was about to try it out, but requiring a database for this purpose is a no-go for me.
I'll try out this one https://github.com/schenkd/nginx-ui it seems it doesn't require a database.
+1 having mariadb for storing 99% of 10kb readonly data on embed devices make this powerfull software useless.
It also add more maintenance, less robustness, more attack surface.
Most other containers that don鈥檛 need such a robust database use SQLite which exists in a single file and is quite reliable (even used by some major browsers).
Being able to migrate a single file (whether an SQLite dB or a JSON file would make things much easier when needing to migrate).
@tg44 Do you know how we might be able to get a working instance using Sqlite?
Heads up to this thread; Sqlite works!
Example db config; https://github.com/tg44/nginx-proxy-manager/blob/6690b7735d494820a7c0fa243dda86157bceb282/backend/config/sqlite-test-db.json
@tg44 Great news! I can't wait to try this!
@tg44 Do you know what a sample docker compose would look like using SQlite?
My currently working compose;
version: "3"
services:
nginx-proxy-manager:
image: jc21/nginx-proxy-manager:github-pr-510
restart: unless-stopped
ports:
# Public HTTP Port:
- 80:80
# Public HTTPS Port:
- 443:443
# Admin Web Port:
- 81:81
volumes:
# Make sure this config.json file exists as per instructions above:
- /hdd/docker/nginx-proxy-manager/config.json:/app/config/production.json
- /hdd/docker/nginx-proxy-manager/data:/data
- /hdd/docker/nginx-proxy-manager/letsencrypt:/etc/letsencrypt
And config json;
{
"database": {
"engine": "knex-native",
"knex": {
"client": "sqlite3",
"connection": {
"filename": "/data/mydb.sqlite"
},
"pool": {
"min": 0,
"max": 1,
"createTimeoutMillis": 3000,
"acquireTimeoutMillis": 30000,
"idleTimeoutMillis": 30000,
"reapIntervalMillis": 1000,
"createRetryIntervalMillis": 100,
"propagateCreateError": false
},
"migrations": {
"tableName": "migrations",
"stub": "src/backend/lib/migrate_template.js",
"directory": "src/backend/migrations"
}
}
}
}
I think using latest or github-develop tags should work too, and they are much safer to use than any pr tags.
@tg44 Perfect. Thanks! This work for me too.
@Daemach I think we can close this issue.
@tg44 The SQLite configuration works great, however i'm having troubles requesting an SSL certificate. It seems to fetch the certificate correctly, but there seems to be an issue with an SQL datetime conversion. (See #584)
Most helpful comment
Heads up to this thread; Sqlite works!
Example db config; https://github.com/tg44/nginx-proxy-manager/blob/6690b7735d494820a7c0fa243dda86157bceb282/backend/config/sqlite-test-db.json