Using envsubst to Merge Environment Variables into Config Files

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 ธ.ค. 2024

ความคิดเห็น • 11

  • @2115grzesiek
    @2115grzesiek 2 หลายเดือนก่อน +1

    Hey! Great video 😃

  • @MrGenbu
    @MrGenbu ปีที่แล้ว +1

    thanks for the great video

    • @NickJanetakis
      @NickJanetakis  ปีที่แล้ว

      No problem, thanks for watching.

  • @natriummuriaticum
    @natriummuriaticum 3 ปีที่แล้ว +1

    thanx a lot!

  • @isandozi
    @isandozi 2 ปีที่แล้ว

    Thank you for this video. Is it possible to use envsubst wtih a JSON file? I am in the process of changing a value for a key in a JSON file.

    • @NickJanetakis
      @NickJanetakis  2 ปีที่แล้ว

      No problem, yes it works with any file type.

  • @fuseteam
    @fuseteam 3 ปีที่แล้ว

    could you link the video surrounding the convention of using braces in your variables?

    • @NickJanetakis
      @NickJanetakis  3 ปีที่แล้ว

      Turns out I never made such a video but I thought I did at the time of recording this one. I'll make one soon.
      For now the TL;DR is it's mainly for consistency's sake. If you ever want to supply a default or index an array you need the braces. It's also handy to avoid being confused on how something might be parsed, putting the braces around the variable removes all confusion at a glance.

    • @fuseteam
      @fuseteam 3 ปีที่แล้ว

      @@NickJanetakis ah cool thanks

    • @NickJanetakis
      @NickJanetakis  3 ปีที่แล้ว

      @@fuseteam Turns out I briefly mentioned it in a related blog post from 3 years ago about quoting your variables at nickjanetakis.com/blog/here-is-why-you-should-quote-your-variables-in-bash. There's a tiny paragraph near the end about braces.
      I'll still make a video about braces in general tho since it deserves its own dedicated video and post with more examples and details.

  • @danielhd6719
    @danielhd6719 2 ปีที่แล้ว

    TL;DR - Its a templating engine for stuff that doesn't have that out of the box and your template variables are env variables.