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.md
+11-8Lines changed: 11 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,18 @@
1
1
# getting started with docker-mysql-nodejs
2
2
3
-
Running a nodejs application with mysql database as microservices using docker
4
-
using microservice architecture
3
+
Running a nodejs application with mysql database using docker and microservice architecture
5
4
6
-
### our end goal
5
+
### Our end goal
7
6
8
7
- Launch mysql server in a docker container.
9
8
- Launch our simple node app in a separate container.
10
9
- Link these two containers and test our integrated mysql-nodejs app.
11
10
12
-
### prerequisite
11
+
### Youtube link-
12
+
13
+
Watch this tutorial at https://youtu.be/tIbMSqTEpfY
14
+
15
+
### Prerequisite
13
16
14
17
- must have docker set up and running on your system
15
18
@@ -69,7 +72,7 @@ We are also naming our container as test-mysql-microservice `--name`
69
72
14. We have successfully launched a mysql container
70
73
71
74
72
-
### connecting to newly launched mysql container from host (optional)
75
+
### Connecting to newly launched mysql container from host (optional)
73
76
74
77
To verify that our test-mysql-microservice container is up and running, we'll connect to it.
75
78
Follow below steps if you have mysql (mysql-client) installed on your system.
@@ -144,12 +147,12 @@ Note that we are inside nodejs-microservice directory. `test-nodejs` would be na
144
147
* `--link test-mysql-microservice:db` link to the container named test-mysql-microservice and refer to it as db
145
148
* `--name` naming our container as test-nodejs-microservice
146
149
147
-
10. How to know your MYSQL_HOST-
150
+
10. How to know your MYSQL_HOST-
148
151
Note that I am using `172.17.0.2` ip-address as MYSQL_HOST. This is the IpAddress of our test-mysql-microservice container.
149
152
You must replace this value to your container's ipAddress. Use `docker inspect test-mysql-microservice | grep IPAddress`
150
153
151
154
152
-
### testing our complete app
155
+
### Testing our complete app
153
156
154
157
If everything is good so far then congratulations :smile: You have a complete app running with two microservices. To test this you can use CURL command from your host machine
155
158
@@ -162,7 +165,7 @@ Here 192.168.43.147 is my host IpAddress `ifconfig | grep inet`
162
165
163
166
4. Again fetch all students to see updated results `curl -X POST 192.168.43.147:4000/get-students`
164
167
165
-
5. Modify sorce code of nodejs app, build image, run container and test again.
168
+
5. Modify source code of nodejs app, build image, run container and test again.
0 commit comments