Skip to content

Commit

Permalink
Merge pull request #18 from bitswan-space/feature/pre-env-default
Browse files Browse the repository at this point in the history
add option for default env vars for global services
  • Loading branch information
JachymDolezal committed Apr 24, 2024
2 parents de58227 + accac8e commit ed30d1c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions pre/main.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@
"\n",
" data_machines = bitswan_yaml.get(\"data-machines\", {})\n",
" data_machines = data_machines if data_machines else {}\n",
" \n",
"\n",
" for deployment_id, conf in data_machines.items():\n",
" if conf is None:\n",
" conf = {}\n",
Expand All @@ -395,9 +395,13 @@
" \"gitops.deployment_id\": deployment_id,\n",
" }\n",
" if \"env-dir\" in bitswan_yaml:\n",
" env_file = os.path.join(bitswan_yaml[\"env-dir\"], deployment_id)\n",
" if os.path.exists(env_file):\n",
" entry[\"env_file\"] = [env_file]\n",
" entry[\"env_file\"] = []\n",
" env_file = os.path.join(bitswan_yaml[\"env-dir\"], deployment_id)\n",
" if os.path.exists(env_file):\n",
" entry[\"env_file\"].append(env_file)\n",
" env_default_file = os.path.join(bitswan_yaml[\"env-dir\"], \"default\")\n",
" if os.path.exists(env_default_file):\n",
" entry[\"env_file\"].append(env_default_file)\n",
"\n",
" if \"network_mode\" in conf:\n",
" entry[\"network_mode\"] = conf[\"network_mode\"]\n",
Expand Down

0 comments on commit ed30d1c

Please sign in to comment.