yats.git

commit bc892b1b0bc1b6d369f80c49bf597bbe01b5546c

Author: Paolo Lulli <paolo@lulli.net>

Merge branch 'add-yats-client'

 compose.yml | 19 +++++++++++++++++++
 server/Dockerfile | 11 -----------
 server/grpc/metric-grpc-client.go | 1 -





diff --git a/compose.yml b/compose.yml
new file mode 100644
index 0000000000000000000000000000000000000000..724c33bd5145433827a1f66f7b32037874bba034
--- /dev/null
+++ b/compose.yml
@@ -0,0 +1,19 @@
+services:
+  #  yats-server:
+  #  build: server
+  #  ports:
+  #    - 8080:8080
+
+  cassandra:
+    image: cassandra:latest
+    container_name: cassandra-container
+    ports:
+      - "9042:9042"
+    environment:
+      - CASSANDRA_USER=admin
+      - CASSANDRA_PASSWORD=admin
+    volumes:
+      - cassandra-data:/var/lib/cassandra
+
+volumes:
+  cassandra-data:




diff --git a/server/Dockerfile b/server/Dockerfile
deleted file mode 100644
index e4a6dee934bb51d7a814ac64b6bd37c82f9365cc..0000000000000000000000000000000000000000
--- a/server/Dockerfile
+++ /dev/null
@@ -1,11 +0,0 @@
-FROM docker.io/golang:1.23rc2-alpine3.20 as build
-
-WORKDIR /app
-COPY . ./
-RUN go mod download
-RUN go build -o yats-server .
-
-# stage2 - serve the app
-FROM build as serve
-EXPOSE 8080
-CMD [ "./yats-server" ]




diff --git a/server/grpc/metric-grpc-client.go b/server/grpc/metric-grpc-client.go
index b8916c18cb0ccb7a136bb1d01578393d69a312fd..d063ac7c0f4c93c041cd591a42b98cba7f1619eb 100644
--- a/server/grpc/metric-grpc-client.go
+++ b/server/grpc/metric-grpc-client.go
@@ -30,7 +30,6 @@
 	ctx, cancel := context.WithTimeout(context.Background(), time.Second)
 	defer cancel()
 
-	// Create an item
 	item := &proto.Metric{IdClient: "DefaultIdClient", Name: "Item 1", Mtime: time.Now().UnixMilli(), Value: "This is the value"}
 	res, err := c.CreateMetric(ctx, &proto.CreateMetricRequest{Metric: item})
 	if err != nil {