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: examples/docker/README.md
+15-7Lines changed: 15 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,14 @@
1
1
# Chronos Dockerized Microservices Example
2
2
3
3
This sample microservices architecture allows developers to explore the functionality of Chronos but with one docker compose command. This consists of four microservices, which are contained within the directories:
4
+
4
5
- books
5
6
- customers
6
7
- frontend
7
8
- orders
8
9
9
10
Each microservice has its own server, which receives requests from both the client and from other microservices.
11
+
10
12
-_books_, _customers_, and _orders_ also have their own databases, which they can query to respond to those requests.
11
13
12
14
The frontend has a reverse proxy set up for proxying requests to the appropriate service (individual application) in the microservice network.
@@ -22,12 +24,14 @@ Docker also ensures that the versions that worked well on dev are bundled up and
22
24
For additional details on how Chronos works this example, please review the Docker section in the [Chronos NPM Package README](../../chronos_npm_package/README.md).
23
25
24
26
## Steps to Run Example
27
+
25
28
Peform the following steps in each of the _books_, _customers_, _frontend_, and _orders_ directories
26
29
27
-
1. Add a `.env` file to *each* folder with the following key/value pairs:
30
+
1. Add a `.env` file to _each_ folder with the following key/value pairs:
31
+
28
32
-**NOTE**: Ensure that there are no quotes surrounding any of the keys and values.
29
33
30
-
>>>New collaboration group - testing all 5 url added to each .env// --> testing now...<<<
34
+
>> > New collaboration group - testing all 5 url added to each .env// --> testing now...<<<
31
35
32
36
```
33
37
CHRONOS_DB = MongoDB or PostgreSQL
@@ -36,21 +40,24 @@ BOOK_URI = A MongoDB URI for the bookserver microservice to use
36
40
CUSTOMER_URI = A MongoDB URI for the customerserver microservice to use
37
41
ORDER_URI = A MongoDB URI for the orderserver microservice to use
38
42
```
43
+
39
44
2. Verify that `@chronosmicro/tracker` is a dependency in each of the _books_, _customers_, _frontend_, and _orders_ folders (see the `package.json` in each folder).
40
45
41
46
- If the @chronosmicro/tracker dependency is listed as a **remote** npm package (i.e. `"@chronosmicro/tracker": "^11.0.1"`) and you've ran `npm install`, no further work is needed continue to step 3.
42
47
43
48
- If you have the dependency as
44
-
`"@chronosmicro/tracker": "file:./chronos_npm_package"`, which is a **local** file, make sure to change the version from `"file:./chronos_npm_package"` to `"^11.0.1"` and run npm install.
49
+
`"@chronosmicro/tracker": "file:./chronos_npm_package"`, which is a **local** file, make sure to change the version from `"file:./chronos_npm_package"` to `"^11.0.1"` and run npm install.
50
+
51
+
3. With the terminal navigated to the the _examples/docker_ folder, run the command:
45
52
46
-
3. With the terminal navigated to the the _examples/docker_ folder, run the command:
53
+
> > > No working, installing VSC docker ext<<< --must have docker installed for this command to run
47
54
48
-
>>>No working, installing VSC docker ext<<< --must have docker installed for this command to run
49
55
```
50
56
docker-compose -f docker-compose.yml up
51
57
```
52
58
53
-
#
59
+
4. If you run into any issues regarding 'linux/amd64,linux/arm/v7,linux/arm64/v8' for cadvisor, navigate to the docker-compose.yml and find the cadvisor dictionary. Change "platform" to linux/arm64/v8 for M1 Chips and linux/amd64 for Intel Chips.
60
+
###
54
61
55
62
You should now see the containers running in your terminal, each reporting `"Docker data recorded in..."`.
56
63
@@ -85,6 +92,7 @@ Use `docker compose down` to remove.
85
92
Chronos hopes to inspire an active community of both users and developers. For questions, comments, or contributions, please submit a pull request.
86
93
87
94
Read our [contributing README](../../CONTRIBUTING.md) to further learn how you can take part in improving Chronos.
0 commit comments