Skip to content

Commit

Permalink
feat(db): added glpi-db.env
Browse files Browse the repository at this point in the history
  • Loading branch information
kemboi22 committed Jul 30, 2024
1 parent 2028380 commit c0dfd8c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions imageroot/bin/discover-database
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import os

database = "database.env"
# check if it exists
# set the default values

if not os.path.exists(database):
mariadb_config = {
Expand All @@ -22,5 +23,16 @@ if not os.path.exists(database):
'MARIADB_PASSWORD': 'Glpi,1234',
'MARIADB_AUTO_UPGRADE': '1'
}
glpi_db = {
"VERSION_GLPI": "10.0.12",
"TIMEZONE": "Europe/Brussels",
"MARIADB_DB_TYPE": "mysql",
"MARIADB_DB_HOST": "mariadb-app",
"MARIADB_DB_PORT": "3306",
"MARIADB_DB_USER": 'glpi',
"MARIADB_DB_PASSWORD": 'Glpi,1234',
"MARIADB_DB_NAME": 'glpi'
}
agent.write_envfile("glpi-db.env", glpi_db)
agent.write_envfile("database.env", mariadb_config)

0 comments on commit c0dfd8c

Please sign in to comment.