Skip to content

Commit

Permalink
add analys
Browse files Browse the repository at this point in the history
  • Loading branch information
AlinaMoon123 committed Dec 12, 2024
1 parent 19d5a4b commit 48c992f
Show file tree
Hide file tree
Showing 34 changed files with 970 additions and 12,680 deletions.
3 changes: 3 additions & 0 deletions lake-catalog/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPRING_NEO4J_URI=bolt://db:7687
SPRING_NEO4J_AUTHENTICATION_USERNAME=neo4j
SPRING_NEO4J_AUTHENTICATION_PASSWORD=neo4jneo4j
13 changes: 13 additions & 0 deletions lake-catalog/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM openjdk:17-jdk-slim AS build
RUN apt-get update && apt-get install -y maven

Check failure on line 2 in lake-catalog/Dockerfile

View workflow job for this annotation

GitHub Actions / Проверка наличия тега 0.8 и работоспособности docker-compose

DL3008 warning: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`

Check failure on line 2 in lake-catalog/Dockerfile

View workflow job for this annotation

GitHub Actions / Проверка наличия тега 0.8 и работоспособности docker-compose

DL3015 info: Avoid additional packages by specifying `--no-install-recommends`
WORKDIR /app
COPY pom.xml ./
COPY src ./src
RUN mvn clean package -DskipTests

FROM openjdk:17-jdk-slim
WORKDIR /app
COPY --from=build /app/target/lake-catalog-0.0.1-SNAPSHOT.jar app.jar
EXPOSE 8080
COPY records.json /app/data/records.json
ENTRYPOINT ["java", "-jar", "app.jar"]
Binary file added lake-catalog/db-init/neo4j.dump
Binary file not shown.
42 changes: 42 additions & 0 deletions lake-catalog/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
version: '3.8'

services:
app:
build:
context: .
dockerfile: Dockerfile
ports:
- '127.0.0.1:8080:8080'
depends_on:
db:
condition: service_healthy
environment:
SPRING_APPLICATION_NAME: lake-catalog
SPRING_NEO4J_URI: ${SPRING_NEO4J_URI}
SPRING_NEO4J_AUTHENTICATION_USERNAME: ${SPRING_NEO4J_AUTHENTICATION_USERNAME}
SPRING_NEO4J_AUTHENTICATION_PASSWORD: ${SPRING_NEO4J_AUTHENTICATION_PASSWORD}
volumes:
- app_data:/app/data
networks:
- app-network

db:
image: neo4j:5.7.0
environment:
NEO4J_AUTH: neo4j/neo4jneo4j
volumes:
- db_data:/data
healthcheck:
test: ["CMD-SHELL", "cypher-shell -u neo4j -p neo4jneo4j 'RETURN 1' || exit 1"]
interval: 10s
timeout: 5s
retries: 5
networks:
- app-network

volumes:
db_data:
app_data:

networks:
app-network:
38 changes: 38 additions & 0 deletions lake-catalog/import.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[
{
"l": {
"properties": {
"name": "Байкал",
"region": "Иркутская область",
"city": "Байкальск",
"rating": 5.0,
"depth": 1642.0,
"square": 31722.0,
"description": "Байкал — крупнейший пресноводный водоем планеты по объему и самое глубокое озеро в мире. Расположено в южной Сибири. В Байкале сосредоточено 20% мировых запасов пресной воды.",
"photos": [
"https://cs14.pikabu.ru/post_img/2023/03/06/9/og_og_1678113296297786669.jpg",
"https://img51994.kanal-o.ru/img/2020-08-31/fmt_94_024_shutterstock_216263854.jpg"
]
}
}
},
{
"l": {
"properties": {
"name": "Эльтон",
"region": "Волгоградская область",
"city": "пос. Эльтон",
"rating": 4.2,
"depth": 0.6,
"square": 152.0,
"description": "Эльтон — самое большое соленое озеро в Европе. Находится в Волгоградской области. Известно своими лечебными грязями и минерализованной водой.",
"photos": [
"https://cdn.tripster.ru/thumbs2/71307514-cf06-11ee-b422-b2cdcf927e0f.1080x810.jpeg",
"https://img.tourister.ru/files/1/4/9/7/9/4/9/1/original.jpg"
]
}
}
}

]

Empty file added lake-catalog/lakes.json
Empty file.
Loading

0 comments on commit 48c992f

Please sign in to comment.