Maagan-Michael / net-n

Micro ISP management system
https://maagan-michael.github.io/net-n/
MIT License
1 stars 1 forks source link

[Infra] Dockerize the components #4

Open yarons opened 10 months ago

yarons commented 10 months ago

Create Dockerfile for:

  1. UI - React.
  2. Backend - Python.
  3. DataSync - Python.

The solution is working with an internal database so we need to add that to the docker-compose as well (Latest postgres).

yarons commented 9 months ago

@nathanschwarz I need your help with controlling the variables from outside the docker. We will need the following:

UI

  1. Backend URL.
  2. Localization.
  3. Other special flags (feel free to add).

Backend

  1. DB URL.
  2. Sync Module URL.
  3. Control plane (IMC/SNMP) URLs and module type.
  4. Other special flags.

Sync Module

  1. Oracle DB URL.
  2. Backend URL.
  3. DB URL.
  4. Other special flags/configfile.

IMC Adapter

  1. IMC URL.
  2. Credentials.
  3. Other special flags.

SNMP Module (Wrapper around Ansible script).

  1. MIB tree.
  2. Inventory.
  3. Playbook.
  4. Other special flags.
nathanschwarz commented 9 months ago

@yarons I rely on a YAML configuration, the path to the file is given through an environment variable. I think a single yaml file should be used for all parameters needed in :

You'll only need to pass the file to the respective containers filesystem (through a shared volume). I will drop a config exemple somewhere

The front-end environment variables are replaced at build time by the vite build process. I think we should rely on "ARG" through the multistage build.

yarons commented 9 months ago

That should suffice, we will need to add an example of a working configuration (and a more extensive file explaining all the possible options), thanks.

nathanschwarz commented 9 months ago

@yarons I added a YAML config example here