Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow pre-configuring channels without a running instance #578

Open
dhirschfeld opened this issue Dec 23, 2022 · 2 comments
Open

Allow pre-configuring channels without a running instance #578

dhirschfeld opened this issue Dec 23, 2022 · 2 comments

Comments

@dhirschfeld
Copy link
Contributor

I guess the channel information is kept in the database? This would therefore enable the CLI to directly manipulate the database without having to go through the REST api.

@dhirschfeld
Copy link
Contributor Author

It would be ideal to be able to specify an initial set of channels in the config file

@dhirschfeld
Copy link
Contributor Author

For now I've hacked it in my dockerfile:

RUN quetz create /home/user/quetz
WORKDIR /home/user/quetz

RUN python <<EOF
from quetz.database import get_session
from quetz.db_models import Channel

session = get_session("sqlite:///./quetz.sqlite")
for env in ('dev', 'uat', 'prod'):
    channel = Channel(
        name=f"seau/{env}",
        description=f"Conda channel for the {env.upper()} environment."
    )
    session.add(channel)

session.commit()
session.close()
EOF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant