<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="87786" data-post-id="87786">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="maz" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/maz/120/6075_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  maz
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hi all, using <code>Elixir 1.6.4/Phoenix 1.4.0-dev</code> I’m having trouble in build.sh when running Dockerfile.build:</p>
<p><code>RUN npm i</code></p>
<p>gives me:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">npm ERR! write after end
npm ERR! write after end
npm ERR! write after end
npm ERR! write after end
npm ERR! write after end

npm ERR! A complete log of this run can be found in:
npm ERR!     /opt/app/.npm/_logs/2018-07-11T01_15_54_198Z-debug.log
The command '/bin/sh -c npm i' returned a non-zero code: 1
Unable to find image 'dynt-build:latest' locally
</code></pre>
<p>So I tried fetching the latest <code>npm</code> which works but then it fails at the <code>npm deploy</code> step:</p>
<p><code>RUN npm i npm@latest -g</code></p>
<p>which now says webpack is missing(when it runs <code>scripts</code> in <code>package.json</code>):</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">  "scripts": {
    "deploy": "webpack --mode production",
    "watch": "webpack --mode development --watch"
  },
</code></pre>
<pre data-code-wrap="elixir"><code class="lang-elixir">Step 7/13 : RUN npm i npm@latest -g
 ---&gt; Running in bc37bb5a75b6
/usr/bin/npm -&gt; /usr/lib/node_modules/npm/bin/npm-cli.js
/usr/bin/npx -&gt; /usr/lib/node_modules/npm/bin/npx-cli.js
+ npm@6.1.0
added 228 packages from 48 contributors, removed 79 packages and updated 91 packages in 40.484s
Removing intermediate container bc37bb5a75b6
 ---&gt; 55d96a8fc918
Step 8/13 : RUN npm run deploy
 ---&gt; Running in b03b51c1621e

&gt; @ deploy /opt/app/assets
&gt; webpack --mode production

sh: webpack: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! @ deploy: `webpack --mode production`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the @ deploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /opt/app/.npm/_logs/2018-07-11T01_19_24_208Z-debug.log
The command '/bin/sh -c npm run deploy' returned a non-zero code: 1
Unable to find image 'dynt-build:latest' locally
</code></pre>
<p>But why? Shouldn’t webpack be present since I’m deploying via phoenix 1.4.0-dev which has webpack enabled by default?</p>
<p>I could avoid <code>npm run deploy</code> but then there will be no input path for <code>RUN mix phx.digest</code>:</p>
<pre data-code-wrap="Step"><code class="lang-Step"> ---&gt; Running in c4c306bea664
The input path "priv/static" does not exist
</code></pre>
<p>Which in turn breaks docker when the container needs to built from <code>docker-compose up</code></p>
<p>Michael</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="87786" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/flexible-dockerized-phoenix-deployments-1-2-1-3/12477/43">Post #42</a>
	                </div>
	            </div>
              <div id="likers-container-87786" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="87786"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #42"></div>
  </section>
</div>
    <div class="postbit" id="87902" data-post-id="87902">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="jswny" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jswny/120/18428_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  jswny
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Yeah the latest Phoenix uses Webpack instead of Brunch, which probably requires some modifications. I haven’t really worked with the new Phoenix at all so I’m not sure about how it works yet but switching from Brunch to Webpack should be easy enoughl. It looks like Webpack isn’t getting into your <code>$PATH</code>, which is why it can’t be found. I don’t think you can just change the <code>RUN npm i</code> line to <code>RUN npm i npm@latest -g</code> because then you won’t install anything <em>except</em> the latest NPM. I think you should do both lines like so:</p>
<pre data-code-wrap="Docker"><code class="lang-Docker">RUN npm i npm@latest -g
RUN npm i
</code></pre>
<p>I’m not sure if that’s what you are doing already, but try it out. Also, if that doesn’t work please post your <code>Dockerfile.build</code> and your <code>package.json</code> and I will see if I can see what’s wrong.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="87902" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/flexible-dockerized-phoenix-deployments-1-2-1-3/12477/44">Post #43</a>
	                </div>
	            </div>
              <div id="likers-container-87902" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="87902"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #43"></div>
  </section>
</div>
    <div class="postbit" id="87928" data-post-id="87928">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="maz" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/maz/120/6075_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  maz
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hey thanks your suggestions worked, I successfully built.</p>
<p>One thing though, I’m seeing the same issue from here:<br>
<a href="https://github.com/bitwalker/distillery/issues/220" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/bitwalker/distillery/issues/220</a></p>
<p>This is the log:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">dynt-db   | 2018-07-12 01:05:45.491 UTC [47] LOG:  database system was shut down at 2018-07-12 01:05:45 UTC
dynt-db   | 2018-07-12 01:05:45.496 UTC [1] LOG:  database system is ready to accept connections
dynt-admin | Loading ..
dynt-admin | {"init terminating in do_boot",{{badmatch,{error,{"no such file or directory","nil.app"}}},[{'Elixir.Dynt.ReleaseTasks',seed,0,[{file,"lib/dynt/release_tasks.ex"},{line,19}]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}
dynt-admin | init terminating in do_boot ({{badmatch,{error,{[_],[_]}}},[{Elixir.Dynt.ReleaseTasks,seed,0,[{_},{_}]},{init,start_em,1,[]},{init,do_boot,3,[]}]})
dynt-admin | 
dynt-admin | Crash dump is being written to: erl_crash.dump...done
dynt-admin exited with code 1
</code></pre>
<p>It’s not clear to me why this is happening in my case because</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">  def repos, do: Application.get_env(dynt(), :ecto_repos, [])
</code></pre>
<p>Is a list of applications, not repos.</p>
<p>I also noticed that #{me} is returning empty string in the log i.e. <code>"Loading .."</code> should instead say <code>"Loading dynt.."</code></p>
<p>I will paste the entire <code>release_tasks.ex</code> load is failing on this line(19):</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">    :ok = Application.load(me):
</code></pre>
<p>full release_tasks.ex:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule Dynt.ReleaseTasks do

  @start_apps [
    :crypto,
    :ssl,
    :postgrex,
    :ecto
  ]

  def dynt, do: Application.get_application(__MODULE__)

  def repos, do: Application.get_env(dynt(), :ecto_repos, [])

  def seed do
    me = dynt()

    IO.puts "Loading #{me}.."
    # Load the code for dynt, but don't start it
    :ok = Application.load(me)

    IO.puts "Starting dependencies.."
    # Start apps necessary for executing migrations
    Enum.each(@start_apps, &amp;Application.ensure_all_started/1)

    # Start the Repo(s) for dynt
    IO.puts "Starting repos.."
    Enum.each(repos(), &amp;(&amp;1.start_link(pool_size: 1)))

    # Run migrations
    migrate()

    # Run seed script
    Enum.each(repos(), &amp;run_seeds_for/1)

    # Signal shutdown
    IO.puts "Success!"
    :init.stop()
  end

  def migrate, do: Enum.each(repos(), &amp;run_migrations_for/1)

  def priv_dir(app), do: "#{:code.priv_dir(app)}"

  defp run_migrations_for(repo) do
    app = Keyword.get(repo.config, :otp_app)
    IO.puts "Running migrations for #{app}"
    Ecto.Migrator.run(repo, migrations_path(repo), :up, all: true)
  end

  def run_seeds_for(repo) do
    # Run the seed script if it exists
    seed_script = seeds_path(repo)
    if File.exists?(seed_script) do
      IO.puts "Running seed script.."
      Code.eval_file(seed_script)
    end
  end

  def migrations_path(repo), do: priv_path_for(repo, "migrations")

  def seeds_path(repo), do: priv_path_for(repo, "seeds.exs")

  def priv_path_for(repo, filename) do
    app = Keyword.get(repo.config, :otp_app)
    repo_underscore = repo |&gt; Module.split |&gt; List.last |&gt; Macro.underscore
    Path.join([priv_dir(app), repo_underscore, filename])
  end
end
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="87928" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/flexible-dockerized-phoenix-deployments-1-2-1-3/12477/45">Post #44</a>
	                </div>
	            </div>
              <div id="likers-container-87928" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="87928"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #44"></div>
  </section>
</div>
    <div class="postbit" id="87929" data-post-id="87929">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="jswny" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jswny/120/18428_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  jswny
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Awesome! I actually know exactly what this error is. For some reason, sometimes <code>Application.get_application/1</code> often doesn’t work in production. It has been discussed a bunch of times and as far as I know there isn’t any fix for it besides hardcoding your app name. So, replace the call to that function with the name of your application like <code>:myapp</code> and that should work. It’s actually in the guide but its not very clear right now so I will try to update it to be more clear about this specific error message <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p>
<p>Edit: I just updated the “Troubleshooting” section of the guide to reflect this. Take a look at that if you need more specifics <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="87929" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/flexible-dockerized-phoenix-deployments-1-2-1-3/12477/46">Post #45</a>
	                </div>
	            </div>
              <div id="likers-container-87929" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="87929"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #45"></div>
  </section>
</div>
    <div class="postbit" id="87933" data-post-id="87933">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="maz" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/maz/120/6075_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  maz
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>That helped thanks.<br>
I’m almost there! <code>docker-compose up</code> fires-up <code>dynt-db</code>, <code>dynt-admin</code> and <code>dynt-server</code> but <code>dynt-server</code>/phoenix doesn’t enter a state where it is accepting connections.</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">~ ᐅ http localhost:5000

http: error: ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) while doing GET request to URL: http://localhost:5000/
</code></pre>
<p>This is the log:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">~/webapp/phx/1.4.0-dev/dynt (master ✘)✹ ᐅ docker-compose up        
Creating network "dynt_default" with the default driver
Pulling db (postgres:10.2-alpine)...
10.2-alpine: Pulling from library/postgres
ff3a5c916c92: Pull complete
a503b44e1ce0: Pull complete
211706713093: Pull complete
8df57d533e71: Pull complete
7858f71c02fb: Pull complete
55a8ef17ba59: Pull complete
3fb44f23d323: Pull complete
65cad41156b3: Pull complete
5492a5bead70: Pull complete
Digest: sha256:2cdf8430d7c1f59b3d3808f672944491aabf0fdf15da5b5e158e9fa4162453bf
Status: Downloaded newer image for postgres:10.2-alpine
Building admin
Step 1/5 : FROM bitwalker/alpine-erlang:20.3.2
20.3.2: Pulling from bitwalker/alpine-erlang
2fdfe1cd78c2: Already exists
9ebca238abc6: Pull complete
8b81f5dbc183: Pull complete
Digest: sha256:de3f1a537acbc9c6d920104369eb15b5043f7316d661785bf52987288b6aae54
Status: Downloaded newer image for bitwalker/alpine-erlang:20.3.2
 ---&gt; d8328b810c7c
Step 2/5 : ENV MIX_ENV=prod
 ---&gt; Running in 025cf746c098
Removing intermediate container 025cf746c098
 ---&gt; e48fe25e859b
Step 3/5 : ADD _build/prod/rel/dynt/releases/0.1.0/dynt.tar.gz ./
 ---&gt; 192fd6f99c99
Step 4/5 : USER default
 ---&gt; Running in aaa59b902d2a
Removing intermediate container aaa59b902d2a
 ---&gt; 1b92cfc388d2
Step 5/5 : ENTRYPOINT ["./bin/dynt"]
 ---&gt; Running in 0ee9f8e32921
Removing intermediate container 0ee9f8e32921
 ---&gt; 7b7fcc8f6ca8
Successfully built 7b7fcc8f6ca8
Successfully tagged dynt-release:latest
WARNING: Image for service admin was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.
Creating dynt-db ... done
Creating dynt-admin ... done
Creating dynt-server ... done
Attaching to dynt-db, dynt-admin, dynt-server
dynt-db   | The files belonging to this database system will be owned by user "postgres".
dynt-db   | This user must also own the server process.
dynt-db   | 
dynt-db   | The database cluster will be initialized with locale "en_US.utf8".
dynt-db   | The default database encoding has accordingly been set to "UTF8".
dynt-db   | The default text search configuration will be set to "english".
dynt-db   | 
dynt-db   | Data page checksums are disabled.
dynt-db   | 
dynt-db   | fixing permissions on existing directory /var/lib/postgresql/data ... ok
dynt-db   | creating subdirectories ... ok
dynt-db   | selecting default max_connections ... 100
dynt-db   | selecting default shared_buffers ... 128MB
dynt-db   | selecting dynamic shared memory implementation ... posix
dynt-db   | creating configuration files ... ok
dynt-db   | running bootstrap script ... ok
dynt-db   | performing post-bootstrap initialization ... sh: locale: not found
dynt-db   | 2018-07-12 02:24:34.389 UTC [28] WARNING:  no usable system locales were found
dynt-db   | ok
dynt-db   | syncing data to disk ... 
dynt-db   | WARNING: enabling "trust" authentication for local connections
dynt-db   | You can change this by editing pg_hba.conf or using the option -A, or
dynt-db   | --auth-local and --auth-host, the next time you run initdb.
dynt-db   | ok
dynt-db   | 
dynt-db   | Success. You can now start the database server using:
dynt-db   | 
dynt-db   |     pg_ctl -D /var/lib/postgresql/data -l logfile start
dynt-db   | 
dynt-db   | waiting for server to start....2018-07-12 02:24:37.101 UTC [33] LOG:  listening on IPv4 address "127.0.0.1", port 5432
dynt-db   | 2018-07-12 02:24:37.101 UTC [33] LOG:  could not bind IPv6 address "::1": Address not available
dynt-db   | 2018-07-12 02:24:37.101 UTC [33] HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
dynt-db   | 2018-07-12 02:24:37.107 UTC [33] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
dynt-db   | 2018-07-12 02:24:37.144 UTC [34] LOG:  database system was shut down at 2018-07-12 02:24:34 UTC
dynt-db   | 2018-07-12 02:24:37.148 UTC [33] LOG:  database system is ready to accept connections
dynt-db   |  done
dynt-db   | server started
dynt-db   | CREATE DATABASE
dynt-db   | 
dynt-db   | ALTER ROLE
dynt-db   | 
dynt-db   | 
dynt-db   | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
dynt-db   | 
dynt-db   | 2018-07-12 02:24:37.627 UTC [33] LOG:  received fast shutdown request
dynt-db   | waiting for server to shut down....2018-07-12 02:24:37.683 UTC [33] LOG:  aborting any active transactions
dynt-db   | 2018-07-12 02:24:37.685 UTC [33] LOG:  worker process: logical replication launcher (PID 40) exited with exit code 1
dynt-db   | 2018-07-12 02:24:37.685 UTC [35] LOG:  shutting down
dynt-db   | 2018-07-12 02:24:37.751 UTC [33] LOG:  database system is shut down
dynt-db   |  done
dynt-db   | server stopped
dynt-db   | 
dynt-db   | PostgreSQL init process complete; ready for start up.
dynt-db   | 
dynt-db   | 2018-07-12 02:24:37.872 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
dynt-db   | 2018-07-12 02:24:37.872 UTC [1] LOG:  listening on IPv6 address "::", port 5432
dynt-db   | 2018-07-12 02:24:37.894 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
dynt-db   | 2018-07-12 02:24:37.941 UTC [46] LOG:  database system was shut down at 2018-07-12 02:24:37 UTC
dynt-db   | 2018-07-12 02:24:37.947 UTC [1] LOG:  database system is ready to accept connections
dynt-admin | Loading ..
dynt-admin | Starting dependencies..
dynt-admin | Starting repos..
dynt-admin | Running migrations for dynt
dynt-admin | 02:24:45.214 [info] Already up
dynt-admin | Running seed script..
dynt-admin | Success!
dynt-admin exited with code 0
</code></pre>
<aside class="onebox allowlistedgeneric" data-onebox-src="https://bitbucket.org/sidha/dynt-phx14/src/master/">
  <header class="source">
      <img src="https://bbc-object-storage--frontbucket.us-east-1.prod.public.atl-paas.net/d191f72026b8/img/logos/bitbucket/android-chrome-old-192x192.png" class="site-icon" alt="" width="192" height="192">

      <a href="https://bitbucket.org/sidha/dynt-phx14/src/master/" target="_blank" rel="noopener nofollow ugc">bitbucket.org</a>
  </header>

  <article class="onebox-body">
    

<h3><a href="https://bitbucket.org/sidha/dynt-phx14/src/master/" target="_blank" rel="noopener nofollow ugc">Bitbucket</a></h3>



  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>
 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="87933" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/flexible-dockerized-phoenix-deployments-1-2-1-3/12477/47">Post #46</a>
	                </div>
	            </div>
              <div id="likers-container-87933" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="87933"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #46"></div>
  </section>
</div>
    <div class="postbit" id="87949" data-post-id="87949">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="NobbZ" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/NobbZ/120/27235_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  NobbZ
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="onebox allowlistedgeneric" data-onebox-src="https://bitbucket.org/sidha/dynt-phx14/src/e74a15bbe139c9354752fd84636a896157d4cd53/Dockerfile.run?at=master&amp;fileviewer=file-view-default#Dockerfile.run-13">
  <header class="source">
      <img src="https://bbc-object-storage--frontbucket.us-east-1.prod.public.atl-paas.net/a4b6b25d6042/img/logos/bitbucket/android-chrome-old-192x192.png" class="site-icon" alt="" width="192" height="192">

      <a href="https://bitbucket.org/sidha/dynt-phx14/src/e74a15bbe139c9354752fd84636a896157d4cd53/Dockerfile.run?at=master&amp;fileviewer=file-view-default#Dockerfile.run-13" target="_blank" rel="noopener nofollow">bitbucket.org</a>
  </header>

  <article class="onebox-body">
    

<h3><a href="https://bitbucket.org/sidha/dynt-phx14/src/e74a15bbe139c9354752fd84636a896157d4cd53/Dockerfile.run?at=master&amp;fileviewer=file-view-default#Dockerfile.run-13" target="_blank" rel="noopener nofollow">Bitbucket</a></h3>



  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>

<p>That line is the culprit. The entrypoint has to be <code>["./bin/dynt", "start"]</code> (or <code>["./bin/dynt", "foreground"]</code>). When starting there should be a log from <code>dynt-server</code> telling you that you did not specify a command for your application and it doesn’t know what to do.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="87949" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/flexible-dockerized-phoenix-deployments-1-2-1-3/12477/48">Post #47</a>
	                </div>
	            </div>
              <div id="likers-container-87949" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="87949"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #47"></div>
  </section>
</div>
    <div class="postbit" id="87959" data-post-id="87959">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="MalloZup" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/MalloZup/120/15071_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  MalloZup
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><span class="mention">@jswn</span> thank you for sharing i will have look at it for my phoenix app <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"> <img src="https://forum.elixirforum.com/images/emoji/apple/+1.png?v=15" title=":+1:" class="emoji" alt=":+1:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="87959" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/flexible-dockerized-phoenix-deployments-1-2-1-3/12477/49">Post #48</a>
	                </div>
	            </div>
              <div id="likers-container-87959" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="87959"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #48"></div>
  </section>
</div>
    <div class="postbit" id="87981" data-post-id="87981">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="jswny" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jswny/120/18428_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  jswny
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I’m not sure it is. The <code>ENTRYPOINT</code> just specifies which base command should be. Then, as I have it set up for the guide, you can provide a different <code>CMD</code> to the <code>ENTRYPOINT</code> to specify which arguments should be passed in. For instance, his <code>server</code> should run with <code>foreground</code> as seen <a href="https://bitbucket.org/sidha/dynt-phx14/src/e74a15bbe139c9354752fd84636a896157d4cd53/docker-compose.yml?at=master&amp;fileviewer=file-view-default#docker-compose.yml-30" rel="noopener nofollow ugc">on his repo</a>.</p>
<p><a class="mention" href="/u/maz" rel="nofollow">@maz</a><br>
Can you run <code>docker logs dynt-server</code> to see the output from your server container? I can’t even see it doing anything in the log you posted, which is very odd. It might not be starting or something.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="87981" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/flexible-dockerized-phoenix-deployments-1-2-1-3/12477/50">Post #49</a>
	                </div>
	            </div>
              <div id="likers-container-87981" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="87981"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #49"></div>
  </section>
</div>
    <div class="postbit" id="87982" data-post-id="87982">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="NobbZ" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/NobbZ/120/27235_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  NobbZ
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Yes you are right. The entrypoint gets appended by the command, and I have overlooked it in the compose file.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="87982" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/flexible-dockerized-phoenix-deployments-1-2-1-3/12477/51">Post #50</a>
	                </div>
	            </div>
              <div id="likers-container-87982" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="87982"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #50"></div>
  </section>
</div>
    <div class="postbit" id="88104" data-post-id="88104">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="maz" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/maz/120/6075_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  maz
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<pre data-code-wrap="elixir"><code class="lang-elixir">~/webapp/phx/1.4.0-dev/dynt (master ✔) ᐅ docker logs dynt-server
02:28:54.816 [info] SIGTERM received - shutting down
</code></pre>
<p>That’s it.. It’s four minutes later than the previous logs because I ran it couple times after the recording of the other log.</p>
<p>Here’s a more complete log:</p>
<aside class="onebox githubgist" data-onebox-src="https://gist.github.com/mazz/7bd328a3b8e1153ae705fbe245f677d4">
  <header class="source">

      <a href="https://gist.github.com/mazz/7bd328a3b8e1153ae705fbe245f677d4" target="_blank" rel="noopener nofollow ugc">gist.github.com</a>
  </header>

  <article class="onebox-body">
    <h4><a href="https://gist.github.com/mazz/7bd328a3b8e1153ae705fbe245f677d4" target="_blank" rel="noopener nofollow ugc">https://gist.github.com/mazz/7bd328a3b8e1153ae705fbe245f677d4</a></h4>



  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>

<p>It’s interesting that when I shutdown by hitting ctrl-c(twice), only dynt-admin and dynt-db are shutdown, not dynt-server</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">^CGracefully stopping... (press Ctrl+C again to force)
Stopping dynt-server ... done
Stopping dynt-db ... done
</code></pre>
<p>but earlier on, after <code>docker-compose up</code> all three are fired-up:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">Creating dynt-db ... done
Creating dynt-admin ... done
Creating dynt-server ... done
Attaching to dynt-db, dynt-admin, dynt-server
</code></pre>
<p><strong>RUN 2</strong></p>
<p>This is weird, I tried another <code>docker-compose up</code> and <code>dynt-server</code> is getting a <code>SIGTERM</code>:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">dynt-server | 02:09:39.013 [info] SIGTERM received - shutting down
dynt-server | 
dynt-server | 02:18:22.816 [info] SIGTERM received - shutting down
dynt-server | 
</code></pre>
<p>I think it has something to do with the postgresql db failing to launch. Here is the whole log of ‘run 2’:</p>
<aside class="onebox githubgist" data-onebox-src="https://gist.github.com/mazz/79555265859ae009d5da8bfc958286fb">
  <header class="source">

      <a href="https://gist.github.com/mazz/79555265859ae009d5da8bfc958286fb" target="_blank" rel="noopener nofollow ugc">gist.github.com</a>
  </header>

  <article class="onebox-body">
    <h4><a href="https://gist.github.com/mazz/79555265859ae009d5da8bfc958286fb" target="_blank" rel="noopener nofollow ugc">https://gist.github.com/mazz/79555265859ae009d5da8bfc958286fb</a></h4>



  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>

<p>It could be me forgetting to do <code>docker-compose down</code> before <code>up</code> but I just tried that and I’m back to square one where ctrl-c will shutdown db and server but not server. I have yet to see the http server return a page.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="88104" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/flexible-dockerized-phoenix-deployments-1-2-1-3/12477/52">Post #51</a>
	                </div>
	            </div>
              <div id="likers-container-88104" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="88104"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #51"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/12477/load_more?page=6">Load more posts (24 remaining)</a>
</div></template></turbo-stream>