OSC / nginx_stage

[MOVED] Stages & controls the per-user NGINX environment
https://github.com/OSC/ondemand/tree/master/nginx_stage
MIT License
0 stars 1 forks source link

Convert keys to symbols from config #8

Closed nickjer closed 8 years ago

nickjer commented 8 years ago

Currently, the code expects the config to be in the proper format, i.e., keys should be symbols:

app_config_path:
  :dev: '/var/lib/nginx/config/apps/%{env}/%{owner}/%{name}.conf'
  :usr: '/var/lib/nginx/config/apps/%{env}/%{owner}/%{name}.conf'
  :sys: '/var/lib/nginx/config/apps/%{env}/%{name}.conf'

Note the preceding colon on the keys. The code nginx_stage can be altered so that it auto-symbolizes those keys making the config more user-friendly:

app_config_path:
  dev: '/var/lib/nginx/config/apps/%{env}/%{owner}/%{name}.conf'
  usr: '/var/lib/nginx/config/apps/%{env}/%{owner}/%{name}.conf'
  sys: '/var/lib/nginx/config/apps/%{env}/%{name}.conf'