<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>eatsmart</author_name>
  <author_url>https://blog.hatena.ne.jp/eatsmart/</author_url>
  <blog_title>EatSmartシステム部ブログ</blog_title>
  <blog_url>https://eatsmart.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>Dockerコンテナで動かすnginxの設定ファイルでホストのIPアドレスを参照する必要があったので、方法を調べました。 まずnginxの設定ファイルを用意します。 参照したい環境変数を&quot;${HOST_IP_ADDRESS}&quot;のように記述します。 proxy_pass http://${HOST_IP_ADDRESS}:8080; つぎに、Dockerfileで起動時にenvsubstでnginxの設定ファイルに環境変数を埋め込むようにします。 CMD [&quot;/bin/sh&quot;, &quot;-c&quot;, &quot;envsubst '$$HOST_IP_ADDRESS' &lt; /etc/nginx/conf.d/con…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Featsmart.hatenablog.com%2Fentry%2F2022%2F09%2F16%2F175250&quot; title=&quot;nginxのconfで環境変数を利用する - EatSmartシステム部ブログ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-09-16 17:52:50</published>
  <title>nginxのconfで環境変数を利用する</title>
  <type>rich</type>
  <url>https://eatsmart.hatenablog.com/entry/2022/09/16/175250</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
