You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.adoc
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -226,6 +226,29 @@ If the machine state is stopped, starte it with
226
226
docker-machine start
227
227
----
228
228
229
+
Now we need a WildFly and a database. Start with the Postgres database.
230
+
231
+
[source, text]
232
+
----
233
+
docker run --name db -d -p 5432:5432 -e POSTGRES_USER=ticketmonster -e POSTGRES_PASSWORD=ticketmonster-docker <INSTRUCTOR_IP>:5000/postgres
234
+
----
235
+
This command starts a container named "db" from the image in your instructor's registry "<INSTRUCTOR_IP>:5000/postgres". As this will not be present locally, it needs to be downloaded first. But you'll have a very quick connection to the instructor registry and this shouldn't take long.
236
+
The two "-e" options define environment variables which are read by the db at startup and allow us to access the database with this user and password.
237
+
Finally, the "-d" option tells docker to start a demon process. "-p" maps container ports to host ports and allows other containers on our host to access it.
238
+
239
+
This should have worked. To double check if it did, you can see the server logs
240
+
[source, text]
241
+
----
242
+
docker logs -f db
243
+
----
244
+
The "-f" flag keeps refreshing the logs and pushes new events directly out to the console.
245
+
246
+
After the database server is up and running we now need the WildFly.
247
+
[source, text]
248
+
----
249
+
docker run -d --name wildfly --link db:db <INSTRUCTOR_IP>:5000/wildfly-ticketmonster
0 commit comments