Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.
TypeScript analyticsanalytics-dashboardclickhouseelixirgoogle-analyticsmarketingopen-source-analyticsphoenixplausible-analyticspostgresqlprivacyprivacy-friendlyself-hostedsimple-analyticsstatisticstailwindcssweb-analyticswebsite-analyticswebsite-statswebsite-tracking
Default to 127.0.0.1 listen_ip on non-docker use-cases
Uku Taht69576aa253e5
diff --git a/Dockerfile b/Dockerfileindex 3b6bc4c87e..3815c9f9a9 100644--- a/Dockerfile+++ b/Dockerfile@@ -70,6 +70,7 @@ RUN chown -R plausibleuser:plausibleuser /appUSER plausibleuserWORKDIR /appENV GEONAMES_SOURCE_FILE=/app/lib/plausible-0.0.1/priv/geonames.csv+ENV LISTEN_IP=0.0.0.0ENTRYPOINT ["/entrypoint.sh"]EXPOSE 8000CMD ["run"]diff --git a/config/runtime.exs b/config/runtime.exsindex 7ea33f73a3..46372f0ace 100644--- a/config/runtime.exs+++ b/config/runtime.exs@@ -8,16 +8,18 @@ endconfig_dir = System.get_env("CONFIG_DIR", "/run/secrets")# Listen IP supports IPv4 and IPv6 addresses.-listen_ip = (- str = get_var_from_path_or_env(config_dir, "LISTEN_IP") || "0.0.0.0"- case :inet.parse_address(String.to_charlist(str)) do- {:ok, ip_addr} ->- ip_addr-- {:error, reason} ->- raise "Invalid LISTEN_IP '#{str}' error: #{inspect(reason)}"- end-)+listen_ip =+ (+ str = get_var_from_path_or_env(config_dir, "LISTEN_IP") || "127.0.0.1"++ case :inet.parse_address(String.to_charlist(str)) do+ {:ok, ip_addr} ->+ ip_addr++ {:error, reason} ->+ raise "Invalid LISTEN_IP '#{str}' error: #{inspect(reason)}"+ end+ )# System.get_env does not accept a non string defaultport = get_var_from_path_or_env(config_dir, "PORT") || 8000