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

Utils service startup #704

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,3 @@ dependencies:
- pytest-asyncio
- pytest-timeout
- pydantic >=2
- pip:
- git+https://github.com/jupyter-server/jupyter_releaser.git@v2
24 changes: 2 additions & 22 deletions quetz/basic_frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,28 +52,8 @@ <h1>Quetz</h1>
<a href="/auth/github/login" style="margin-right: 100px" id="github_login"
>login with github</a
>
<a href="/auth/gitlab/login" style="margin-right: 100px" id="gitlab_login"
>login with gitlab</a
>
<a href="/auth/google/login" style="margin-right: 100px" id="google_login"
>login with google</a
>
<a href="/auth/azuread/login" style="margin-right: 100px" id="azuread_login"
>login with AzureAD</a
>
<a href="/auth/github/revoke" style="margin-right: 100px" id="revoke"
>revoke github</a
>
<a href="/auth/gitlab/revoke" style="margin-right: 100px" id="revoke"
>revoke gitlab</a
>
<a href="/auth/google/revoke" style="margin-right: 100px" id="revoke"
>revoke google</a
>
<a href="/auth/azuread/revoke" style="margin-right: 100px" id="revoke"
>revoke AzureAD</a
>

<a href="/auth/github/revoke" style="margin-right: 100px" id="revoke">revoke github</a>
<a href="/docs" style="margin-right: 100px" id="docs">swagger</a>
<div class="modal">
<div class="modal-content">
<span class="close-button">&times;</span>
Expand Down
6 changes: 3 additions & 3 deletions quetz/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ def copy_package(
tags=["channels"],
)
def get_channel_members(
channel: db_models.Channel = Depends(get_channel_or_fail),
channel: db_models.Channel = Depends(get_channel_allow_proxy),
dao: Dao = Depends(get_dao),
auth: authorization.Rules = Depends(get_rules),
):
Expand All @@ -1048,7 +1048,7 @@ def get_channel_members(
@api_router.post("/channels/{channel_name}/members", status_code=201, tags=["channels"])
def post_channel_member(
new_member: rest_models.PostMember,
channel: db_models.Channel = Depends(get_channel_or_fail),
channel: db_models.Channel = Depends(get_channel_allow_proxy),
dao: Dao = Depends(get_dao),
db=Depends(get_db),
auth: authorization.Rules = Depends(get_rules),
Expand All @@ -1074,7 +1074,7 @@ def post_channel_member(
@api_router.delete("/channels/{channel_name}/members", tags=["channels"])
def delete_channel_member(
username: str,
channel: db_models.Channel = Depends(get_channel_or_fail),
channel: db_models.Channel = Depends(get_channel_allow_proxy),
dao: Dao = Depends(get_dao),
db=Depends(get_db),
auth: authorization.Rules = Depends(get_rules),
Expand Down
12 changes: 12 additions & 0 deletions utils/quetz.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=quetz service
[Service]
WorkingDirectory=/home/user
Type=simple
User=user
RestartSec=10
ExecStart=/home/user/start_quetz.sh
Restart=on-failure
[Install]
WantedBy=multi-user.target

5 changes: 5 additions & 0 deletions utils/start_quetz.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
source $HOME/mambaforge/etc/profile.d/conda.sh
conda activate quetz
export FORWARDED_ALLOW_IPS='*'
quetz start quetz_server --host 0.0.0.0 --reload --proxy-headers
Loading