Skip to content

Commit

Permalink
feat : adds authentication to docker
Browse files Browse the repository at this point in the history
  • Loading branch information
rajadilipkolli committed Apr 1, 2024
1 parent 7792408 commit cb32944
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 4 deletions.
34 changes: 34 additions & 0 deletions embeddingstores/neo4j-springai/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/

### VS Code ###
.vscode/
/docker/neo4j_db/
13 changes: 12 additions & 1 deletion embeddingstores/neo4j-springai/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,15 @@ services:
image: neo4j:latest
ports:
- 7474:7474
- 7687:7687
- 7687:7687
environment:
- NEO4J_AUTH=neo4j/password
- NEO4J_apoc_export_file_enabled=true
- NEO4J_apoc_import_file_enabled=true
- NEO4J_apoc_import_file_use__neo4j__config=true
- NEO4J_PLUGINS=["apoc", "graph-data-science"]
volumes:
- ./neo4j_db/data:/data
- ./neo4j_db/logs:/logs
- ./neo4j_db/import:/var/lib/neo4j/import
- ./neo4j_db/plugins:/plugins
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public void storeEmbeddings() {
List<Document> documents =
List.of(new Document("I like football."), new Document("The weather is good today."));
vectorStore.add(documents);
LOGGER.info("Added initial documents");
}

public AIChatResponse queryEmbeddingStore(String question) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ public class TestNeo4jVectorEmbeddingStoreExample {
@Bean
@ServiceConnection
Neo4jContainer<?> neo4jContainer() {
return new Neo4jContainer<>(DockerImageName.parse("neo4j:5"))
.withoutAuthentication()
.withLabsPlugins("apoc");
return new Neo4jContainer<>(DockerImageName.parse("neo4j:5")).withLabsPlugins("apoc");
}

public static void main(String[] args) {
Expand Down

0 comments on commit cb32944

Please sign in to comment.