fixup port for db adapter

This commit is contained in:
2025-04-22 12:22:48 +02:00
parent 87020e0daf
commit b307658c6c
3 changed files with 15 additions and 8 deletions

View File

@@ -23,7 +23,7 @@ import (
)
const (
defaultHTTPPort = ":80"
defaultHTTPPort = ":5237"
defaultMemgraphURI = "bolt://memgraph:7687"
defaultMemgraphUser = "memgraph"
defaultMemgraphPass = "memgraph"
@@ -83,8 +83,15 @@ func main() {
router.Use(cors.New(cors.Config{
AllowOrigins: []string{fmt.Sprintf("http://localhost%s", httpPort), "http://localhost"},
AllowCredentials: true,
AllowHeaders: []string{"X-User-ID", "X-User-Name", "Content-Type"},
MaxAge: 12 * time.Hour,
AllowHeaders: []string{
"X-User-ID",
"X-User-Name",
"Content-Type",
"cf-access-token",
"CF-Access-Client-Secret",
"CF-Access-Client-Id",
},
MaxAge: 12 * time.Hour,
}))
router.Use(ginzap.Ginzap(logger, time.RFC3339, true))

View File

@@ -41,16 +41,16 @@ services:
image: vcscsvcscs/gheritage-db-adapter:latest
container_name: db-adapter
ports:
- "8080:8080"
- "5237:5237"
depends_on:
- memgraph
environment:
- HTTP_PORT=:8080
- HTTP_PORT=:5237
- MEMGRAPH_URI=bolt://memgraph:7687
- MEMGRAPH_USER=<USERNAME>
- MEMGRAPH_PASSWORD=<PASSWORD>
healthcheck:
test: ["CMD-SHELL", "curl --fail http://localhost:8080/health || exit 1"]
test: ["CMD-SHELL", "curl --fail http://localhost:5237/health || exit 1"]
interval: 10s
timeout: 5s
retries: 3

View File

@@ -21,11 +21,11 @@ services:
dockerfile: ./integration-test.dockerfile
container_name: db-adapter
ports:
- "8080:8080"
- "5237:5237"
depends_on:
- memgrapht
environment:
- HTTP_PORT=:8080
- HTTP_PORT=:5237
- MEMGRAPH_URI=bolt://memgrapht:7687
- MEMGRAPH_USER=memgraph
- MEMGRAPH_PASSWORD=memgraph