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_new/docker/README.md
+12-8Lines changed: 12 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,18 +39,22 @@ For additional details on how Chronos works this example, please review the Dock
39
39
40
40
Peform the following steps in each of the _Auth_, _Items_, _Inventory_, _Orders_, _Client_, and _Event-Bus_ directories
41
41
42
-
1. Add a `.env` file to each of _Auth_, _Items_, _Inventory_, _Orders_, _Event-Bus_, and _Client_ folders with the following key/value pairs:
42
+
1. Add a `.env` file to each of _Auth_, _Items_, _Inventory_, _Orders_, _Event-Bus_, and _Client_ folders with the following key/value pairs (a `sample.env` file is provided in the `/examples/docker` directory):
43
43
44
44
-**NOTE**: Ensure that there are no quotes surrounding any of the keys and values.
45
45
46
46
```
47
47
CHRONOS_DB = MongoDB or PostgreSQL
48
48
CHRONOS_URI = The URI to the desired MongoDB or PostgreSQL database to save health metrics via Chronos
49
-
AUTH_URI = A MongoDB URI for the auth server microservice to use
50
-
ITEMS_URI = A MongoDB URI for the items server microservice to use
51
-
INVENTORY_URI = A MongoDB URI for the inventory server microservice to use
52
-
ORDERS_URI = A MongoDB URI for the orders server microservice to use
53
49
CHRONOS_GRAFANA_API_KEY = Bearer [the access token you created in above section (Grafana API Key)]
50
+
51
+
MONGO_URI_AUTH = A MongoDB URI for the auth server microservice to use
52
+
MONGO_URI_ITEMS = A MongoDB URI for the items server microservice to use
53
+
MONGO_URI_INVENTORY = A MongoDB URI for the inventory server microservice to use
54
+
MONGO_URI_ORDERS = A MongoDB URI for the orders server microservice to use
55
+
56
+
JWT_KEY = A random string used to sign and verify JSON Web Tokens used by the auth service - the random string provided in **sample.env** will work
57
+
JWT_LIFETIME = The time-to-expiration of the JSON Web Token used by the auth service - this is set to `1d` in `sample.env` meaning user authentication is valid for 1 day
54
58
```
55
59
56
60
2. Verify that `@chronosmicro/tracker` is a dependency in each of the _Auth_, _Items_, _Inventory_, _Orders_, and _Event-Bus_ folders (see the `package.json` in each folder).
@@ -65,8 +69,8 @@ CHRONOS_GRAFANA_API_KEY = Bearer [the access token you created in above section
65
69
docker-compose -f docker-compose.yml up
66
70
```
67
71
68
-
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 and try the below solutions.
69
-
1. Change `platform` to `linux/arm64/v8` for M1 Chips and `linux/amd64` for Intel Chips.
72
+
4. If you run into any issues regarding `linux/amd64/v8,linux/arm/v7,linux/arm64/v8` for cadvisor, navigate to the docker-compose.yml and find the cadvisor dictionary and try the below solutions.
73
+
1. Change `platform` to `linux/arm64/v8` for M1 Chips and `linux/amd64/v8` for Intel Chips.
70
74
1. Change "image" to `image: gcr.io/cadvisor/cadvisor:latest` to `image: gcr.io/cadvisor/cadvisor:v0.47.0`
71
75
1. Alternatively, use Docker Buildx to specify multi-platform.
72
76
@@ -75,7 +79,7 @@ docker-compose -f docker-compose.yml up
75
79
You should now see the containers running in your terminal, each reporting `"docker metrics recorded in..."`.
76
80
77
81
<palign="center">
78
-
<imgalt="docker data being recorded"src="../../assets/examples_docker_data.png"width="600"height="100">
82
+
<imgalt="docker data being recorded"src="../../assets/docker_example_logs.png"width="450">
79
83
</p>
80
84
81
85
If this is being displayed for the `Auth`, `Items`, `Inventory`, `Orders` microservices then the example is successfully saving health metrics to your database of choice!
0 commit comments