Skip to content

Commit ea29142

Browse files
committed
Starting For the First Time
1 parent 775c8b8 commit ea29142

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

readme.adoc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,29 @@ If the machine state is stopped, starte it with
226226
docker-machine start
227227
----
228228

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
250+
----
251+
229252

230253

231254
### Deploy Ticket Monster

0 commit comments

Comments
 (0)