-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No-config databases or json data storage #200
Comments
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. |
Most other containers that don’t 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;
And config json;
I think using |
thanks @tg44 !!! it worked for me too! |
Any idea how to migrate from an existing mysql nginx-proxy-manager install? |
@timdonovanuk mysql2sqlite should work well. |
@tg44 awesome, thanks! |
Thank you all!
version: "3"
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: always
ports:
# Public HTTP Port:
- '80:80'
# Public HTTPS Port:
- '443:443'
# Admin Web Port:
- '81:81'
environment:
# These are the settings to access your db
#DB_MYSQL_HOST: "db"
#DB_MYSQL_PORT: 3306
#DB_MYSQL_USER: "npm"
#DB_MYSQL_PASSWORD: "npm"
#DB_MYSQL_NAME: "npm"
# If you would rather use Sqlite uncomment this
# and remove all DB_MYSQL_* lines above
DB_SQLITE_FILE: "/data/database.sqlite"
# Uncomment this if IPv6 is not enabled on your host
# DISABLE_IPV6: 'true'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
# depends_on:
# - db
# db:
# image: jc21/mariadb-aria:10.4
# restart: always
# environment:
# MYSQL_ROOT_PASSWORD: 'npm'
# MYSQL_DATABASE: 'npm'
# MYSQL_USER: 'npm'
# MYSQL_PASSWORD: 'npm'
# volumes:
# - ./data/mysql:/var/lib/mysql So I guess no need for mysql anymore. |
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.
The text was updated successfully, but these errors were encountered: