Giter Club home page Giter Club logo

Comments (8)

manuelkamp avatar manuelkamp commented on July 23, 2024 2

bump - I want this too

from proxmox-scripts.

YakkaDev avatar YakkaDev commented on July 23, 2024 1

First method

You need to create /app/config/default.json file and put here next enviropments:

cfg: {
database: {
   'engine': 'mysql',
   'host': 'Host',
   'port': 'PORT',
   'user': 'envMysqlUser',
   'password': 'PASSWORD',
   'name': 'dbName'
 }
}

Then you must to rebuild frontend with yarn or npm (up to you) and reload nginx or reboot container.


Second Method

Also, you can edit /app/config/production.json and replace old vars to this vars.
Then you must to rebuild frontend with yarn or npm (up to you) and reload nginx or reboot container.


Third Method

Also, you can edit /app/lib/config.js and update following lines:

        const envMysqlHost = process.env.DB_MYSQL_HOST || 'HERE HOST';
        const envMysqlUser = process.env.DB_MYSQL_USER || 'HERE USER DB';
        const envMysqlName = process.env.DB_MYSQL_NAME || 'HERE NAME DB';
        if (envMysqlHost && envMysqlUser && envMysqlName) {
                // we have enough mysql creds to go with mysql
                logger.info('Using MySQL configuration');
                instance = {
                        database: {
                                engine:   'mysql',
                                host:     envMysqlHost,
                                port:     process.env.DB_MYSQL_PORT || HERE PORT,
                                user:     envMysqlUser,
                                password: process.env.DB_MYSQL_PASSWORD || 'HERE PASS',
                                name:     envMysqlName,
                        },

Then you must to rebuild frontend with yarn or npm (up to you) and reload nginx or reboot container.


Fourth method

You can use terminal command:

bash
export NODE_ENV='{"config": {"host":"fqdn/ip db", "port":"portdb", "user":"userdb", "name":"namedb", "password":"passdb",}}'

Then you must to rebuild frontend with yarn or npm (up to you) and reload nginx or reboot container.


P.S,
sorry for nekroposting, but mb this helps somebody.

Closed?

from proxmox-scripts.

ej52 avatar ej52 commented on July 23, 2024 1

@YakkaDev Thanks for the detailed answer, I will look at incorporating this into the install script.

from proxmox-scripts.

cdonahue55 avatar cdonahue55 commented on July 23, 2024

None of these methods appear to work.

from proxmox-scripts.

mobilandi avatar mobilandi commented on July 23, 2024

Hi @YakkaDev ,

thanks for your great answer! I'm pretty sure all those methods could work.
But I have to be honest, I have no clue how to rebuild frontend with yarn or npm:D
Could you or anyone give me a hint?

from proxmox-scripts.

ketomagasaki avatar ketomagasaki commented on July 23, 2024

Hello @YakkaDev ,

I tried method 2:

Firstly, I retrieved the SQLite3 database located at /data/database.sqlite then converted it to .sql format and added it to my cluster.

Next, I modified the /app/config/production.json file

I restarted the service, restarted the container. But no change, NPM doesn't pick up the changes from this file. Additionally, there's a README.md in the /app/config/ directory that states the files in this folder are not considered if we are not in development mode.

I'm looking for another solution...

from proxmox-scripts.

ketomagasaki avatar ketomagasaki commented on July 23, 2024

I have now tested method 3. This method works for connecting to an external database.

Unfortunately, the conversion I made from SQLite3 to SQL did not work well, and I encountered a lot of errors. I tried to find the nominal structure in the source GitHub repository: https://github.com/NginxProxyManager/nginx-proxy-manager, but I couldn't find a .sql file to install a proper base for MySQL / MariaDB. Do you know if this file exists?

Thank you

from proxmox-scripts.

ketomagasaki avatar ketomagasaki commented on July 23, 2024

So,

I installed the docker version with MariaDB of NPM by opening port 3306 on the database part. I made a dump of the initial database to create a template. I changed the engine to INNODB because I am on a Galera Cluster (doesn't work with ARIA).

And I imported this template into my cluster.

Now it works. 😅

from proxmox-scripts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.