Skip to content

Commit 99e5f0a

Browse files
committed
Add journal entry for snowflakeid app setup and MongoDB configuration
1 parent a9539cb commit 99e5f0a

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

notes/journal.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,38 @@
8787
- [x] grpcurl
8888
- [ ] openapi
8989

90-
## Daily log - attempt3
90+
## 2025
91+
92+
### Jan
93+
94+
- Created a snowflakeid app. tried to run it in my docker
95+
96+
spin up mongo
97+
98+
```bash
99+
docker run -p 27017:27017 -d --name mongo --hostname mongo mongo:latest --replSet rs0
100+
```
101+
102+
intialize replicaset
91103

104+
```javascript
105+
rs.initiate({ _id: "rs0", members: [ { _id: 0, host: "mongo:27017" } ] })
106+
```
107+
108+
run snowflakeid app
109+
110+
```console
111+
✗ docker run --link mongo --name snowflakeidgen --rm snowflakeidgen
112+
Generated and inserted 10000 IDs.
113+
```
114+
115+
learnt that we can use `--link` option to link two containers, without having to create a new custom network between them.
116+
117+
next:
118+
119+
- set up a docker compose to spin up multiple apps
120+
121+
## Daily log - attempt3
92122

93123
## Day 10 - Deploying a kafka cluster locally on minikube
94124

0 commit comments

Comments
 (0)