Skip to content

Commit

Permalink
chore: add valkey service type
Browse files Browse the repository at this point in the history
  • Loading branch information
tobybellwood committed Nov 3, 2024
1 parent aa5c893 commit 467b192
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions TESTING_dockercompose.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ docker run --rm --net internal-services-test_default jwilder/dockerize dockerize
docker run --rm --net internal-services-test_default jwilder/dockerize dockerize -wait tcp://mongo-4:27017 -timeout 1m
docker run --rm --net internal-services-test_default jwilder/dockerize dockerize -wait tcp://redis-6:6379 -timeout 1m
docker run --rm --net internal-services-test_default jwilder/dockerize dockerize -wait tcp://redis-7:6379 -timeout 1m
docker run --rm --net internal-services-test_default jwilder/dockerize dockerize -wait tcp://valkey-8:6379 -timeout 1m
docker run --rm --net internal-services-test_default jwilder/dockerize dockerize -wait tcp://solr-8:8983 -timeout 1m
docker run --rm --net internal-services-test_default jwilder/dockerize dockerize -wait tcp://solr-9:8983 -timeout 1m

Expand Down Expand Up @@ -74,6 +75,10 @@ docker compose exec -T commons sh -c "curl -kL http://go-web:3000/redis?service=
docker compose exec -T commons sh -c "curl -kL http://go-web:3000/redis?service=redis-7" | grep "SERVICE_HOST=redis-7"
docker compose exec -T commons sh -c "curl -kL http://go-web:3000/redis?service=redis-7" | grep "LAGOON_TEST_VAR=internal-services-test"

# valkey-8 should be able to read/write data
docker compose exec -T commons sh -c "curl -kL http://go-web:3000/valkey?service=valkey-8" | grep "SERVICE_HOST=valkey-8"
docker compose exec -T commons sh -c "curl -kL http://go-web:3000/valkey?service=valkey-8" | grep "LAGOON_TEST_VAR=internal-services-test"

# solr-8 should be able to read/write data
docker compose exec -T commons sh -c "curl -kL http://go-web:3000/solr?service=solr-8" | grep "SERVICE_HOST=solr-8"
docker compose exec -T commons sh -c "curl -kL http://go-web:3000/solr?service=solr-8" | grep "LAGOON_TEST_VAR=internal-services-test"
Expand Down
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ services:
ports:
- '6379'

valkey-8:
image: uselagoon/valkey-8:latest
labels:
lagoon.type: redis
ports:
- '6379'

solr-8:
image: uselagoon/solr-8:latest
labels:
Expand Down
4 changes: 3 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package main
import (
"bytes"
"fmt"
"github.com/gorilla/mux"
"log"
"net/http"
"strings"
"time"

"github.com/gorilla/mux"
)

type funcType func() map[string]string
Expand All @@ -22,6 +23,7 @@ func main() {
r.HandleFunc("/opensearch", opensearchHandler)
r.HandleFunc("/storage", persistentStorageHandler)
r.HandleFunc("/mysql", mariadbHandler)
r.HandleFunc("/valkey", redisHandler)
r.HandleFunc("/", handleReq)
http.Handle("/", r)

Expand Down

0 comments on commit 467b192

Please sign in to comment.