Send netdisco-users mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/netdisco-users
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of netdisco-users digest..."
Today's Topics:

   1. Re: Netdisco Docker-Compose Issue with External DB
      (Christian Ramseyer)
   2. Re: Netdisco Docker-Compose Issue with External DB (Jimmy Taylor)
--- Begin Message ---

Hi Jimmy

On 18.09.22 16:15, Jimmy Taylor via netdisco-users wrote:
Hello all,

I'm trying to deploy Netdisco for a lab and I'm struggling to get the external DB environment variables to work properly. My docker compose:

    version: '2.3'
    services:

      netdisco-backend:
        image: netdisco/netdisco:latest-backend
        volumes:
          - "./netdisco/nd-site-local:/home/netdisco/nd-site-local"
          - "./netdisco/config:/home/netdisco/environments"
          - "./netdisco/logs:/home/netdisco/logs"
        environment:
          NETDISCO_DOMAIN:  'domain.com'
          NETDISCO_DB_NAME: 'netdisco'
          NETDISCO_DB_USER: 'netdisco'
          NETDISCO_DB_PASS: 'password123'
          NETDISCO_DB_HOST: 'db.domain.com'


After Docker compose builds, none of my environment settings are passing to the deployment.yml file, and I'm left with the default Netdisco DB settings.

I'm not sure the docker images reads these environment variables. But in the mounted netdisco/config directory you can find the deplyoment.yml file. Try setting the database connection there, that should work.

Config reference: https://github.com/netdisco/netdisco/wiki/Configuration#essential-settings

Cheers
Christian

--- End Message ---
--- Begin Message ---
I can confirm that works, but I was presuming the environment variables were 
used in Docker images. Perhaps I'm wrong.

If I am wrong, where are the environment variables applied?

https://github.com/netdisco/netdisco/wiki/Environment-Variables

Also, would the workflow for a Docker deployment with an external DB be: 
docker-compose build > update DB settings > start containers?


---

Jimmy Taylor (he, him, dude)
Network Systems Engineer

________________________________
From: Christian Ramseyer <[email protected]>
Sent: Monday, September 19, 2022 11:43 AM
To: Jimmy Taylor <[email protected]>; 
[email protected] <[email protected]>
Subject: Re: [Netdisco] Netdisco Docker-Compose Issue with External DB


Hi Jimmy

On 18.09.22 16:15, Jimmy Taylor via netdisco-users wrote:
Hello all,

I'm trying to deploy Netdisco for a lab and I'm struggling to get the external 
DB environment variables to work properly. My docker compose:

version: '2.3'
services:

  netdisco-backend:
    image: netdisco/netdisco:latest-backend
    volumes:
      - "./netdisco/nd-site-local:/home/netdisco/nd-site-local"
      - "./netdisco/config:/home/netdisco/environments"
      - "./netdisco/logs:/home/netdisco/logs"
    environment:
      NETDISCO_DOMAIN:  'domain.com'
      NETDISCO_DB_NAME: 'netdisco'
      NETDISCO_DB_USER: 'netdisco'
      NETDISCO_DB_PASS: 'password123'
      NETDISCO_DB_HOST: 'db.domain.com'

After Docker compose builds, none of my environment settings are passing to the 
deployment.yml file, and I'm left with the default Netdisco DB settings.

I'm not sure the docker images reads these environment variables. But in the 
mounted netdisco/config directory you can find the deplyoment.yml file. Try 
setting the database connection there, that should work.

Config reference: 
https://github.com/netdisco/netdisco/wiki/Configuration#essential-settings

Cheers
Christian

--- End Message ---
_______________________________________________
Netdisco mailing list - Digest Mode
[email protected]
https://lists.sourceforge.net/lists/listinfo/netdisco-users

Reply via email to