Sonatype Nexus Repository

Менеджер репозитория программного обеспечения, разработанный компанией Sonatype. Обеспечивает централизованное управление зависимостями и артефактами сборки.

Docker

$ docker exec -u root -it docker-nexus3-nexus-1 /bin/bash $ docker logs docker-nexus3-nexus-1

Console / Connect database

$ cd /tmp && java -jar $NEXUS_HOME/lib/support/nexus-orient-console.jar && chown -R nexus:nexus /nexus-data/db $ connect plocal:/nexus-data/db/component admin admin $ connect plocal:/nexus-data/db/config admin admin $ connect plocal:/nexus-data/db/security admin admin

Passord reset

$ connect plocal:/nexus-data/db/security admin admin $ update user SET password="$shiro1$SHA-512$1024$NE+wqQq/TmjZMvfI7ENh/g==$V4yPw8T64UQ6GfJfxYq2hLsVrBY8D1v+bktfOxGdt4b/9BthpWPNUy/CBk6V9iA0nHpzYzJFWO8v/tZFtES8CA==" UPSERT WHERE id="admin" $ exit

Repair database component/config/security

Database config

$ cd /tmp && java -jar $NEXUS_HOME/lib/support/nexus-orient-console.jar $ connect plocal:/nexus-data/db/config admin admin $ REBUILD INDEX * $ REPAIR DATABASE --fix-graph $ REPAIR DATABASE --fix-links $ REPAIR DATABASE --fix-ridbags $ REPAIR DATABASE --fix-bonsai $ REPAIR DATABASE config $ DISCONNECT $ exit

Database component

$ cd /tmp && java -jar $NEXUS_HOME/lib/support/nexus-orient-console.jar $ connect plocal:/nexus-data/db/component admin admin $ REBUILD INDEX * $ REPAIR DATABASE --fix-graph $ REPAIR DATABASE --fix-links $ REPAIR DATABASE --fix-ridbags $ REPAIR DATABASE --fix-bonsai $ REPAIR DATABASE component $ DISCONNECT $ exit

Database security

$ cd /tmp && java -jar $NEXUS_HOME/lib/support/nexus-orient-console.jar $ connect plocal:/nexus-data/db/security admin admin $ REBUILD INDEX * $ REPAIR DATABASE --fix-graph $ REPAIR DATABASE --fix-links $ REPAIR DATABASE --fix-ridbags $ REPAIR DATABASE --fix-bonsai $ REPAIR DATABASE security $ DISCONNECT $ exit
Nexus is insufficient, and some ".wal" files are created in folder "/nexus-data/db/config". After deleting them, everything is restored.

Repaire database component

$ REBUILD INDEX * $ export database component-export $ drop database $ CREATE DATABASE PLOCAL:/nexus-data/db/component $ import database component-export.json.gz $ REBUILD INDEX * $ REPAIR DATABASE --fix-graph $ REPAIR DATABASE --fix-links $ REPAIR DATABASE --fix-ridbags $ REPAIR DATABASE --fix-bonsai $ DISCONNECT

Upgrade version

$ cd /tmp && java -jar $NEXUS_HOME/lib/support/nexus-orient-console.jar && chown -R nexus:nexus /nexus-data/db $ connect plocal:/nexus-data/db/config admin admin orientdb {db=config}> select from upgrade_model_versions

The record can be deleted as follows

$ load record $ truncate record $ rebuild index asset_bucket_component_name_idx $ REPAIR DATABASE component $ DISCONNECT $ exit
$ drop class quartz_trigger $ REPAIR DATABASE component $ DISCONNECT $ exit
$ load record $ truncate record $ rebuild index asset_bucket_component_name_idx $ REPAIR DATABASE component

Использование

Docker

{ "builder": { "gc": { "defaultKeepStorage": "20GB", "enabled": true } }, "experimental": false, "features": { "buildkit": true }, "insecure-registries": [ "192.168.1.132:8182", "192.168.1.132:8181" ], "registry-mirrors": [ "http://192.168.1.132:8182", "http://192.168.1.132:8181" ] }

insecure-registries - Позволяет авторизоваться по HTTP с помощью docker login 192.168.1.132:8181

registry-mirrors - Позволяет использовать в качестве зеркала

Сборка и деплой

$ docker build --build-arg domain={domain} -t lampa:latest . $ docker login 192.168.1.132:8181 $ docker tag lampa:latest 192.168.1.132:8181/lampa-tv $ docker push 192.168.1.132:8181/lampa-tv
$ docker build --build-arg domain={domain} -t lampa:latest . $ docker login 178.140.10.58:8181 $ docker tag lampa:latest 178.140.10.58:8181/lampa-tv $ docker push 178.140.10.58:8181/lampa-tv
$ docker build . --target production -t gemini-to-openai-proxy:latest $ docker login 192.168.1.132:8181 $ docker tag gemini-to-openai-proxy:latest 192.168.1.132:8181/gemini-to-openai-proxy:latest && docker push 192.168.1.132:8181/gemini-to-openai-proxy:latest