Code Monkey home page Code Monkey logo

Comments (8)

Hirevo avatar Hirevo commented on May 12, 2024 1

Your config.json file (living at the root of your crate index) should be of the following shape:

{
    "dl": "<link-to-your-instance-of-alexandrie>/api/v1/crates/{crate}/{version}/download",
    "api": "<link-to-your-instance-of-alexandrie>",
    "allowed-registries": [
        "https://github.com/rust-lang/crates.io-index",
        "<link-to-your-index-repository>"
    ]
}

where you should replace:

  • <link-to-your-instance-of-alexandrie>:
    This is the link to your live instance of Alexandrie.
    Using concrete examples:
    • for crates.io, this value is: https://crates.io.
    • for crates.polomack.eu (my own registry), this value is: https://crates.polomack.eu.
  • <link-to-your-index-repository>:
    This is the link to your crate index repository (the exact repository where this config.json file is living into).
    Using concrete examples:
    • for crates.io, this value is: https://github.com/rust-lang/crates.io-index.
    • for crates.polomack.eu, this value is: https://github.com/Hirevo/alexandrie-index.

Is that helpful ?
Also, have you managed to have an Alexandrie instance built and running, or have you encountered an issue on that front ?

from alexandrie.

jrb0001 avatar jrb0001 commented on May 12, 2024

You need to put the URL to the git repo into .cargo/config and the config.json within that repo must contain the correct URLs to alexandrie. Everything just worked for me afterwards.

from alexandrie.

Hirevo avatar Hirevo commented on May 12, 2024

Yeah, at first sight on the error output, I would suspect the cause of the error to be within the config.json file in your crate index.
Maybe it isn't pointing to the right endpoint.

from alexandrie.

baoyachi avatar baoyachi commented on May 12, 2024

gitlab can do file storg ? not use database.

from alexandrie.

Hirevo avatar Hirevo commented on May 12, 2024

A database is currently a requirement to have in Alexandrie, to serve as the source of truth in case of conflicts between the crate index and the crate storage (if they become out of sync) and/or for faster lookup of crate records.
If you want the least bothersome database option to setup, you can use the SQLite one, which is basically using a single file as your database.

The crate index is just expected to be a Git repository, so it can totally be hosted in GitLab without issues.

In the other hand, for the crate storage, we don't currently allow storing actual crate archives (the actual code of the crates) in a Git repository, because all of these archives can become quite large as a whole and I don't really see the benefit of versioning the crate storage (because the crate index, which is first consulted to lookup these archives, is already versioned).

from alexandrie.

baoyachi avatar baoyachi commented on May 12, 2024

I'd like to be able to store crystals in a simple, lightweight way, but There was a problem with the configuration of that I'm here now config.json.I don't know how to solve it

from alexandrie.

baoyachi avatar baoyachi commented on May 12, 2024

Your config.json file (living at the root of your crate index) should be of the following shape:

{
    "dl": "<link-to-your-instance-of-alexandrie>/api/v1/crates/{crate}/{version}/download",
    "api": "<link-to-your-instance-of-alexandrie>",
    "allowed-registries": [
        "https://github.com/rust-lang/crates.io-index",
        "<link-to-your-index-repository>"
    ]
}

where you should replace:

  • <link-to-your-instance-of-alexandrie>:
    This is the link to your live instance of Alexandrie.
    Using concrete examples:

    • for crates.io, this value is: https://crates.io.
    • for crates.polomack.eu (my own registry), this value is: https://crates.polomack.eu.
  • <link-to-your-index-repository>:
    This is the link to your crate index repository (the exact repository where this config.json file is living into).
    Using concrete examples:

    • for crates.io, this value is: https://github.com/rust-lang/crates.io-index.
    • for crates.polomack.eu, this value is: https://github.com/Hirevo/alexandrie-index.

Is that helpful ?
Also, have you managed to have an Alexandrie instance built and running, or have you encountered an issue on that front ?

Thanks to your help.
I just flow you step solved my problem.

But in the process, I found a few problems,related links are as follows

from alexandrie.

Hirevo avatar Hirevo commented on May 12, 2024

Thanks for filing these additional issues (and even coming up for a PR to address one of them).
Since the original problem of this particular issue seems solved, I am going to close it.
Feel free to reopen it if it isn't the case.

from alexandrie.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.