Skip to content

Commit

Permalink
fixing #90
Browse files Browse the repository at this point in the history
  • Loading branch information
arun-gupta committed Sep 17, 2015
1 parent 5a63790 commit 1641002
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 13 deletions.
35 changes: 30 additions & 5 deletions chapters/docker-compose.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,40 @@ image::docker-compose-output.png[]

### Stop Services

. Stop the services as:
+
Stop the services as:

docker-compose stop
Stopping attendees_mywildfly_1...
Stopping attendees_mysqldb_1...

[WARNING]
====
Stopping and starting the containers again will give the following error:
[source, text]
----
> docker-compose stop
Stopping attendees_mywildfly_1...
Stopping attendees_mysqldb_1...
wildfly_1 |
wildfly_1 | 09:11:07,802 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 4) JBAS014613: Operation ("add") failed - address: ([
wildfly_1 | ("subsystem" => "datasources"),
wildfly_1 | ("jdbc-driver" => "mysql")
wildfly_1 | ]) - failure description: "JBAS014803: Duplicate resource [
wildfly_1 | (\"subsystem\" => \"datasources\"),
wildfly_1 | (\"jdbc-driver\" => \"mysql\")
wildfly_1 | ]"
----
This is expected because the JDBC resource is created during every run of the container. In a real-world application, this would be pre-baked in the configuration already.
====

### Remove Containers

Stop the services as:

docker-compose rm -f
Going to remove attendees_mywildfly_1, attendees_mysqldb_1
Removing attendees_mywildfly_1... done
Removing attendees_mysqldb_1... done

### Scale Services

https://github.com/arun-gupta/docker-java/issues/51
Expand Down
56 changes: 48 additions & 8 deletions readme.html
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ <h1>Docker and Kubernetes for Java Developers</h1>
<li><a href="#_start_services">Start Services</a></li>
<li><a href="#_verify_application">Verify Application</a></li>
<li><a href="#_stop_services">Stop Services</a></li>
<li><a href="#_remove_containers">Remove Containers</a></li>
<li><a href="#_scale_services">Scale Services</a></li>
</ul>
</li>
Expand Down Expand Up @@ -3079,19 +3080,58 @@ <h3 id="_verify_application">Verify Application</h3>
</div>
<div class="sect2">
<h3 id="_stop_services">Stop Services</h3>
<div class="olist arabic">
<ol class="arabic">
<li>
<div class="paragraph">
<p>Stop the services as:</p>
<div class="listingblock">
</div>
<div class="literalblock">
<div class="content">
<pre class="highlight"><code class="language-text" data-lang="text">&gt; docker-compose stop
<pre>docker-compose stop
Stopping attendees_mywildfly_1...
Stopping attendees_mysqldb_1...</code></pre>
Stopping attendees_mysqldb_1...</pre>
</div>
</div>
</li>
</ol>
<div class="admonitionblock warning">
<table>
<tr>
<td class="icon">
<div class="title">Warning</div>
</td>
<td class="content">
<div class="paragraph">
<p>Stopping and starting the containers again will give the following error:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-text" data-lang="text">wildfly_1 |
wildfly_1 | 09:11:07,802 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 4) JBAS014613: Operation ("add") failed - address: ([
wildfly_1 | ("subsystem" =&gt; "datasources"),
wildfly_1 | ("jdbc-driver" =&gt; "mysql")
wildfly_1 | ]) - failure description: "JBAS014803: Duplicate resource [
wildfly_1 | (\"subsystem\" =&gt; \"datasources\"),
wildfly_1 | (\"jdbc-driver\" =&gt; \"mysql\")
wildfly_1 | ]"</code></pre>
</div>
</div>
<div class="paragraph">
<p>This is expected because the JDBC resource is created during every run of the container. In a real-world application, this would be pre-baked in the configuration already.</p>
</div>
</td>
</tr>
</table>
</div>
</div>
<div class="sect2">
<h3 id="_remove_containers">Remove Containers</h3>
<div class="paragraph">
<p>Stop the services as:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>docker-compose rm -f
Going to remove attendees_mywildfly_1, attendees_mysqldb_1
Removing attendees_mywildfly_1... done
Removing attendees_mysqldb_1... done</pre>
</div>
</div>
</div>
<div class="sect2">
Expand Down

0 comments on commit 1641002

Please sign in to comment.