generated from moevm/nsql-clean-tempate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9740f48
commit 47d464f
Showing
14 changed files
with
204 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,10 @@ | |
|
||
<a href=" ./../../../actions/workflows/7_app_is_ready.yml" >![7. App is ready]( ./../../actions/workflows/7_app_is_ready.yml/badge.svg)</a> | ||
|
||
## Данные для входа в приложение | ||
|
||
Логин: [email protected] | ||
Пароль: 123 | ||
|
||
Логин: [email protected] | ||
Пароль: oksana |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM neo4j:5.12 | ||
|
||
ENV NEO4J_AUTH=neo4j/neo4jneo4j | ||
|
||
WORKDIR /var/lib/neo4j | ||
|
||
COPY restore-script.sh /restore-script.sh | ||
|
||
RUN chmod +x /restore-script.sh | ||
|
||
CMD ["/bin/bash", "/restore-script.sh", "&&", "neo4j", "console"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Указываем путь к дампу | ||
DUMP_PATH="/backups/neo4j.dump" | ||
DATABASE_NAME="neo4j" | ||
DATABASE_PATH="/var/lib/neo4j/data/databases/$DATABASE_NAME" | ||
|
||
# Проверка наличия дампа | ||
if [ -f "$DUMP_PATH" ]; then | ||
echo "Дамп найден: $DUMP_PATH" | ||
|
||
# Останавливаем сервер Neo4j перед восстановлением | ||
echo "Останавливаем сервер Neo4j..." | ||
neo4j stop || echo "Сервер уже остановлен или не работает" | ||
|
||
# Если база данных существует, удаляем ее | ||
if [ -d "$DATABASE_PATH" ]; then | ||
echo "Удаляем старую базу данных..." | ||
rm -rf "$DATABASE_PATH" | ||
fi | ||
|
||
# Восстанавливаем базу данных из дампа | ||
echo "Восстанавливаем базу данных из дампа..." | ||
neo4j-admin database load --from-path="/backups" --overwrite-destination=true "$DATABASE_NAME" | ||
|
||
echo "База данных восстановлена успешно." | ||
else | ||
echo "Дамп не найден. Пропуск восстановления." | ||
fi | ||
|
||
# Настройка пароля для пользователя neo4j (можно настроить через переменные окружения) | ||
echo "Настроим пароль пользователя neo4j..." | ||
neo4j-admin dbms set-initial-password "${NEO4J_PASSWORD:-neo4jneo4j}" || echo "Пароль уже настроен" | ||
|
||
# Запуск Neo4j в консольном режиме | ||
echo "Запускаем Neo4j..." | ||
exec neo4j console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
spring.application.name=lake-catalog | ||
|
||
spring.neo4j.uri=neo4j://127.0.0.1::7687 | ||
spring.neo4j.uri=bolt://db:7687 | ||
spring.neo4j.authentication.username=neo4j | ||
spring.neo4j.authentication.password=neo4jneo4j | ||
server.servlet.encoding.charset=UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.