<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Reading env variables with custom app]]></title><description><![CDATA[<p dir="auto">I am trying to install a custom app written in Phoenix Elixir.</p>
<p dir="auto">My dockerfile ends with that:</p>
<pre><code>ADD start.sh /app/start.sh
RUN chmod +x /app/start.sh
CMD [ "/app/start.sh" ]
</code></pre>
<p dir="auto">Earlier, I set my environment variables like that:</p>
<pre><code>ENV SECRET_KEY_BASE=default
</code></pre>
<p dir="auto">Here is my startup script:</p>
<pre><code>#!/bin/bash

set -eu

# Load environment variables
source ./env.list

# Start PROGRAM
exec ./_build/prod/rel/PROGRAM/bin/PROGRAM start
</code></pre>
<p dir="auto">But the environment variables don't seem to be read properly, so the app doesn't start in Cloudron. What am I doing wrong?</p>
]]></description><link>https://forum.cloudron.io/topic/11161/reading-env-variables-with-custom-app</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Apr 2026 13:03:42 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/11161.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 22 Feb 2024 18:39:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Reading env variables with custom app on Fri, 23 Feb 2024 04:00:09 GMT]]></title><description><![CDATA[<p dir="auto">Yes, that works, thank you!</p>
]]></description><link>https://forum.cloudron.io/post/83839</link><guid isPermaLink="true">https://forum.cloudron.io/post/83839</guid><dc:creator><![CDATA[ekevu123]]></dc:creator><pubDate>Fri, 23 Feb 2024 04:00:09 GMT</pubDate></item><item><title><![CDATA[Reply to Reading env variables with custom app on Fri, 23 Feb 2024 03:39:35 GMT]]></title><description><![CDATA[<p dir="auto">First, I'd define them explicitly in the startup script, to see if the exec can see them then.</p>
<p dir="auto">So instead of source .env , export ENV=KEY</p>
]]></description><link>https://forum.cloudron.io/post/83836</link><guid isPermaLink="true">https://forum.cloudron.io/post/83836</guid><dc:creator><![CDATA[robi]]></dc:creator><pubDate>Fri, 23 Feb 2024 03:39:35 GMT</pubDate></item><item><title><![CDATA[Reply to Reading env variables with custom app on Fri, 23 Feb 2024 03:20:24 GMT]]></title><description><![CDATA[<p dir="auto">How would this look like then?</p>
]]></description><link>https://forum.cloudron.io/post/83834</link><guid isPermaLink="true">https://forum.cloudron.io/post/83834</guid><dc:creator><![CDATA[ekevu123]]></dc:creator><pubDate>Fri, 23 Feb 2024 03:20:24 GMT</pubDate></item><item><title><![CDATA[Reply to Reading env variables with custom app on Fri, 23 Feb 2024 02:44:30 GMT]]></title><description><![CDATA[<p dir="auto">No, that's a different part of the build/install process.</p>
<p dir="auto">The envs need to be available as you launch the app.</p>
]]></description><link>https://forum.cloudron.io/post/83833</link><guid isPermaLink="true">https://forum.cloudron.io/post/83833</guid><dc:creator><![CDATA[robi]]></dc:creator><pubDate>Fri, 23 Feb 2024 02:44:30 GMT</pubDate></item><item><title><![CDATA[Reply to Reading env variables with custom app on Fri, 23 Feb 2024 02:42:54 GMT]]></title><description><![CDATA[<p dir="auto">Do you mean to put the exact keys into the dockerfile? I tried that with ENV SECRET_KEY_BASE=KEY, but it didn't work.</p>
]]></description><link>https://forum.cloudron.io/post/83832</link><guid isPermaLink="true">https://forum.cloudron.io/post/83832</guid><dc:creator><![CDATA[ekevu123]]></dc:creator><pubDate>Fri, 23 Feb 2024 02:42:54 GMT</pubDate></item><item><title><![CDATA[Reply to Reading env variables with custom app on Thu, 22 Feb 2024 20:27:13 GMT]]></title><description><![CDATA[<p dir="auto">what if you included them as part of the exec?</p>
]]></description><link>https://forum.cloudron.io/post/83818</link><guid isPermaLink="true">https://forum.cloudron.io/post/83818</guid><dc:creator><![CDATA[robi]]></dc:creator><pubDate>Thu, 22 Feb 2024 20:27:13 GMT</pubDate></item><item><title><![CDATA[Reply to Reading env variables with custom app on Thu, 22 Feb 2024 20:08:22 GMT]]></title><description><![CDATA[<p dir="auto">Yes, in this format:<br />
SECRET_KEY_BASE=KEY</p>
<p dir="auto">I learned now that I can run them via Cloudron CLI using cloudron set env, but I wonder if it was still possible to do that automatically.</p>
]]></description><link>https://forum.cloudron.io/post/83816</link><guid isPermaLink="true">https://forum.cloudron.io/post/83816</guid><dc:creator><![CDATA[ekevu123]]></dc:creator><pubDate>Thu, 22 Feb 2024 20:08:22 GMT</pubDate></item><item><title><![CDATA[Reply to Reading env variables with custom app on Thu, 22 Feb 2024 19:27:42 GMT]]></title><description><![CDATA[<p dir="auto">are they set in env.list ?</p>
]]></description><link>https://forum.cloudron.io/post/83813</link><guid isPermaLink="true">https://forum.cloudron.io/post/83813</guid><dc:creator><![CDATA[robi]]></dc:creator><pubDate>Thu, 22 Feb 2024 19:27:42 GMT</pubDate></item></channel></rss>