Compare commits
No commits in common. "main" and "main" have entirely different histories.
@ -24,11 +24,8 @@ RUN mkdir -p /opt/mirrormanager2
|
|||||||
WORKDIR /opt/mirrormanager2
|
WORKDIR /opt/mirrormanager2
|
||||||
RUN git clone https://github.com/fedora-infra/mirrormanager2.git .
|
RUN git clone https://github.com/fedora-infra/mirrormanager2.git .
|
||||||
|
|
||||||
RUN sed -e 's/signed_fpca/signed_rosca/' -i mirrormanager2/perms.py mirrormanager2/auth.py
|
|
||||||
RUN pip install --prefix=/install .
|
RUN pip install --prefix=/install .
|
||||||
|
|
||||||
RUN pip install --prefix=/install flask_session
|
|
||||||
|
|
||||||
# Stage 2: Final stage with runtime dependencies
|
# Stage 2: Final stage with runtime dependencies
|
||||||
FROM quay.io/fedora/python-312:latest AS runtime
|
FROM quay.io/fedora/python-312:latest AS runtime
|
||||||
LABEL \
|
LABEL \
|
||||||
|
@ -44,22 +44,13 @@ THEME_FOLDER = os.environ.get('MM2_THEME_FOLDER', 'fedora')
|
|||||||
#MM_AUTHENTICATION = "fas"
|
#MM_AUTHENTICATION = "fas"
|
||||||
|
|
||||||
OIDC_CLIENT_SECRETS = "/etc/mirrormanager/client_secrets.json"
|
OIDC_CLIENT_SECRETS = "/etc/mirrormanager/client_secrets.json"
|
||||||
OIDC_SCOPES = " ".join(
|
|
||||||
[
|
|
||||||
"openid",
|
|
||||||
"email",
|
|
||||||
"profile",
|
|
||||||
"https://id.fedoraproject.org/scope/groups",
|
|
||||||
"https://id.fedoraproject.org/scope/agreements",
|
|
||||||
]
|
|
||||||
)
|
|
||||||
|
|
||||||
# If the authentication method is `fas`, groups in which should be the user
|
# If the authentication method is `fas`, groups in which should be the user
|
||||||
# to be recognized as an admin.
|
# to be recognized as an admin.
|
||||||
ADMIN_GROUP = ["infrastructure"]
|
#ADMIN_GROUP = ["sysadmin-main"]
|
||||||
|
|
||||||
# Email of the admin to which send notification or error
|
# Email of the admin to which send notification or error
|
||||||
ADMIN_EMAIL = "infrastructure@rockylinux.org"
|
ADMIN_EMAIL = "admin@fedoraproject.org"
|
||||||
|
|
||||||
# Email address used in the "From" field of the emails sent.
|
# Email address used in the "From" field of the emails sent.
|
||||||
# Default: ``nobody@fedoraproject.org``.
|
# Default: ``nobody@fedoraproject.org``.
|
||||||
|
8
run.py
8
run.py
@ -1,13 +1,5 @@
|
|||||||
from werkzeug.middleware.proxy_fix import ProxyFix
|
from werkzeug.middleware.proxy_fix import ProxyFix
|
||||||
from mirrormanager2.app import create_app
|
from mirrormanager2.app import create_app
|
||||||
from flask_session import Session
|
|
||||||
from cachelib.file import FileSystemCache
|
|
||||||
import os
|
|
||||||
|
|
||||||
application = create_app()
|
application = create_app()
|
||||||
application.debug = os.environ.get("MM2_DEBUG", False)
|
|
||||||
application.config['SESSION_TYPE'] = "cachelib"
|
|
||||||
application.config['SESSION_CACHELIB'] = FileSystemCache(cache_dir='/tmp/sessions', threshold=500)
|
|
||||||
Session(application)
|
|
||||||
application.wsgi_app = ProxyFix(application.wsgi_app, x_proto=1, x_host=1)
|
application.wsgi_app = ProxyFix(application.wsgi_app, x_proto=1, x_host=1)
|
||||||
|
|
||||||
|
19
start-dev.sh
Executable file → Normal file
19
start-dev.sh
Executable file → Normal file
@ -2,6 +2,13 @@ POD=mirrormanager2
|
|||||||
|
|
||||||
podman pod exists $POD || podman pod create -p 5000:5000 -n $POD
|
podman pod exists $POD || podman pod create -p 5000:5000 -n $POD
|
||||||
|
|
||||||
|
#podman run \
|
||||||
|
# --pod $POD \
|
||||||
|
# --name nginx \
|
||||||
|
# --replace \
|
||||||
|
# -v $PWD/nginx.conf:/etc/nginx/conf.d/default.conf:ro \
|
||||||
|
# -d docker.io/library/nginx:1.13-alpine
|
||||||
|
|
||||||
test -d tmp || mkdir tmp
|
test -d tmp || mkdir tmp
|
||||||
test -f client_secrets.json || (echo "missing client_secrets" && exit 2)
|
test -f client_secrets.json || (echo "missing client_secrets" && exit 2)
|
||||||
|
|
||||||
@ -15,13 +22,11 @@ podman run \
|
|||||||
-e "MM2_SECRET_KEY=$(openssl rand -hex 32)" \
|
-e "MM2_SECRET_KEY=$(openssl rand -hex 32)" \
|
||||||
-e "MM2_PASSWORD_SEED=$(openssl rand -hex 32)" \
|
-e "MM2_PASSWORD_SEED=$(openssl rand -hex 32)" \
|
||||||
-e 'MM2_THEME_FOLDER=rocky' \
|
-e 'MM2_THEME_FOLDER=rocky' \
|
||||||
-e 'FLASK_DEBUG=1' \
|
-v $PWD/mirrormanager2.cfg:/etc/mirrormanager/mirrormanager2.cfg \
|
||||||
-e 'MM2_DEBUG=1' \
|
-v $PWD/client_secrets.json:/etc/mirrormanager/client_secrets.json \
|
||||||
-v $PWD/mirrormanager2.cfg:/etc/mirrormanager/mirrormanager2.cfg:z,ro \
|
-v $PWD/tmp:/var/tmp:rw \
|
||||||
-v $PWD/client_secrets.json:/etc/mirrormanager/client_secrets.json:z,ro \
|
-v $PWD/static:/usr/lib/python3.12/site-packages/mirrormanager2/static \
|
||||||
-v $PWD/tmp:/var/tmp:z,rw \
|
-v $PWD/templates:/usr/lib/python3.12/site-packages/mirrormanager2/templates \
|
||||||
-v $PWD/static:/usr/lib/python3.12/site-packages/mirrormanager2/static:z,ro \
|
|
||||||
-v $PWD/templates:/usr/lib/python3.12/site-packages/mirrormanager2/templates:z,ro \
|
|
||||||
-d git.resf.org/infrastructure/mirrormanager2:dev
|
-d git.resf.org/infrastructure/mirrormanager2:dev
|
||||||
|
|
||||||
# Setup sqlite database
|
# Setup sqlite database
|
||||||
|
@ -31,9 +31,7 @@ form.icon button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Stealed this from bootstrap */
|
/* Stealed this from bootstrap */
|
||||||
label,
|
label, select, button,
|
||||||
select,
|
|
||||||
button,
|
|
||||||
input[type="button"],
|
input[type="button"],
|
||||||
input[type="reset"],
|
input[type="reset"],
|
||||||
input[type="submit"],
|
input[type="submit"],
|
||||||
@ -43,33 +41,31 @@ input[type="checkbox"] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.blue {
|
.blue {
|
||||||
color: #0066cc;
|
color:#0066CC;
|
||||||
}
|
}
|
||||||
|
|
||||||
#matrixtitle {
|
#matrixtitle {
|
||||||
background-color: #2963a6;
|
background-color: #2963A6;
|
||||||
color: #ffffff;
|
color: #FFFFFF;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
#matrixheadings,
|
#matrixheadings, #matrixheadings th {
|
||||||
#matrixheadings th {
|
background-color: #DDDDDD;
|
||||||
background-color: #dddddd;
|
border-bottom: 1px solid #BBBBBB;
|
||||||
border-bottom: 1px solid #bbbbbb;
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.matrix_section,
|
.matrix_section, .matrix_section td {
|
||||||
.matrix_section td {
|
border-bottom: 1px solid #BBBBBB !important;
|
||||||
border-bottom: 1px solid #bbbbbb !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.matrix_even,
|
.matrix_even, .matrix_even td {
|
||||||
.matrix_even td {
|
background-color: #F0F0F0;
|
||||||
background-color: #f0f0f0;
|
border-bottom: 1px solid #DDDDDD;
|
||||||
border-bottom: 1px solid #dddddd;
|
border-top: 1px solid #DDDDDD;
|
||||||
border-top: 1px solid #dddddd;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.centered {
|
.centered {
|
||||||
@ -80,9 +76,10 @@ input[type="checkbox"] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.bodycontent {
|
.bodycontent {
|
||||||
min-height: 600px;
|
min-height:600px
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
table.mm2-table-small {
|
table.mm2-table-small {
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
|
318813
static/rocky/rocky.css
318813
static/rocky/rocky.css
File diff suppressed because it is too large
Load Diff
@ -30,9 +30,9 @@
|
|||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro footer() %}
|
{% macro footer() %}
|
||||||
<div class="footer py-5">
|
<div class="footer py-5 text-white">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row footerlinks">
|
<div class="row footerlinks justify-content-center">
|
||||||
<div class="col-sm-3 col-4 mt-3">
|
<div class="col-sm-3 col-4 mt-3">
|
||||||
<div>
|
<div>
|
||||||
<dl>
|
<dl>
|
||||||
@ -67,16 +67,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row footerlinks mt-5">
|
<div class="row footerlinks">
|
||||||
<div class="col-12">
|
<div class="col-12 text-center">
|
||||||
<p> © 2024 Rocky Enterprise Software Foundation, and others. </p>
|
<p> © 2024 Rocky Enterprise Software Foundation, and others. </p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12 text-center">
|
||||||
{% set noggin_link %}
|
{% set noggin_link %}
|
||||||
<a href="https://github.com/fedora-infra/noggin">noggin</a>
|
<a href="https://github.com/fedora-infra/noggin">noggin</a>
|
||||||
{% endset %}
|
{% endset %}
|
||||||
<p>
|
<p>
|
||||||
<a href="https://github.com/fedora-infra/mirrormanager2/">mirrormanager</a>
|
<a href="https://github.com/fedora-infra/mirrormanager2/">mirrormanager</a>
|
||||||
|
-- {{version}}
|
||||||
-- <a href="http://mirrormanager.rtfd.org" rel="noopener noreferrer"
|
-- <a href="http://mirrormanager.rtfd.org" rel="noopener noreferrer"
|
||||||
target="_blank">Documentation</a>
|
target="_blank">Documentation</a>
|
||||||
-- <a href="http://mirrormanager.readthedocs.org/en/latest/contributors.html">Authors</a></p>
|
-- <a href="http://mirrormanager.readthedocs.org/en/latest/contributors.html">Authors</a></p>
|
||||||
@ -107,6 +108,7 @@ href="{{ url_for('static', filename='favicon.ico')}}"/>
|
|||||||
<link rel="stylesheet" type="text/css" media="screen"
|
<link rel="stylesheet" type="text/css" media="screen"
|
||||||
href="{{ url_for('static', filename='mirrormanager2.css') }}"/>
|
href="{{ url_for('static', filename='mirrormanager2.css') }}"/>
|
||||||
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='rocky.css') }}"/>
|
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='rocky.css') }}"/>
|
||||||
|
<link href="{{ url_for('static', filename='fedora-bootstrap/fedora-bootstrap.min.css') }}" rel="stylesheet" />
|
||||||
<link href="{{ url_for('static', filename='fonts/open-sans.css') }}" rel="stylesheet" />
|
<link href="{{ url_for('static', filename='fonts/open-sans.css') }}" rel="stylesheet" />
|
||||||
<link href="{{ url_for('static', filename='fonts/font-awesome.css') }}" rel="stylesheet" />
|
<link href="{{ url_for('static', filename='fonts/font-awesome.css') }}" rel="stylesheet" />
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
@ -122,8 +124,8 @@ href="{{ url_for('static', filename='mirrormanager2.css') }}"/>
|
|||||||
{%endmacro%}
|
{%endmacro%}
|
||||||
|
|
||||||
{% macro nav(is_admin) %}
|
{% macro nav(is_admin) %}
|
||||||
<nav class="navbar navbar-expand-lg navbar-light masthead py-2 container">
|
<nav class="navbar navbar-expand-lg navbar-light masthead py-2">
|
||||||
<a class="navbar-brand" href="{{url_for('base.index')}}"><img src="{{ url_for('static', filename='mirrormanager-logo.png') }}" alt="Fedora Account System logo" height="60"></a>
|
<a class="navbar-brand" href="{{url_for('base.index')}}"><img src="{{ url_for('static', filename='mirrormanager-logo.png') }}" alt="Fedora Account System logo" height="40"></a>
|
||||||
<ul class="navbar-nav align-items-center ms-auto">
|
<ul class="navbar-nav align-items-center ms-auto">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link color-white" href="{{url_for('base.list_mirrors')}}">Mirrors</a>
|
<a class="nav-link color-white" href="{{url_for('base.list_mirrors')}}">Mirrors</a>
|
||||||
@ -158,7 +160,7 @@ href="{{ url_for('static', filename='mirrormanager2.css') }}"/>
|
|||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a class="btn btn-primary ml-2 py-2 rounded-4" href="{{ url_for('auth.login') }}?next={{request.url}}">Login</a>
|
<a class="btn btn-primary ml-2" href="{{ url_for('auth.login') }}?next={{request.url}}">Login</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{% extends 'admin/master.html' %}
|
{% extends 'admin/admin_master.html' %}
|
||||||
|
|
||||||
{% block body %}
|
{% block content %}
|
||||||
<p>
|
<p>
|
||||||
These pages present the admin interface of MirrorManager.
|
These pages present the admin interface of MirrorManager.
|
||||||
</p>
|
</p>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
{%block tag %}home{% endblock %}
|
{%block tag %}home{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2 class="h1 mb-4">Rocky Public Active Mirrors</h2>
|
<h2>Rocky Public Active Mirrors</h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Rocky Linux is distributed to millions of systems globally.
|
Rocky Linux is distributed to millions of systems globally.
|
||||||
@ -34,8 +34,14 @@ I2 means both Internet2 and its peer high speed research and development
|
|||||||
networks globally.
|
networks globally.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<table class="table table-sm mt-5">
|
|
||||||
<tr id="matrixheadings">
|
<table class="table table-sm">
|
||||||
|
<tr id="matrixtitle">
|
||||||
|
<th colspan="{{ arches | length + 2 }}">
|
||||||
|
Mirror list filtering matrix
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
<tr id="matrixheadings" >
|
||||||
<th>Projects</th>
|
<th>Projects</th>
|
||||||
<th>Versions</th>
|
<th>Versions</th>
|
||||||
<th colspan="{{ arches | length}}">
|
<th colspan="{{ arches | length}}">
|
||||||
|
@ -39,22 +39,9 @@ main {
|
|||||||
@apply rounded-md;
|
@apply rounded-md;
|
||||||
}
|
}
|
||||||
|
|
||||||
[type="text"],
|
[type='text'], [type='email'], [type='url'], [type='password'], [type='number'], [type='date'], [type='datetime-local'], [type='month'], [type='search'], [type='tel'], [type='time'], [type='week'], [multiple], textarea, select {
|
||||||
[type="email"],
|
@apply
|
||||||
[type="url"],
|
rounded-md bg-gray-100 dark:bg-gray-700
|
||||||
[type="password"],
|
|
||||||
[type="number"],
|
|
||||||
[type="date"],
|
|
||||||
[type="datetime-local"],
|
|
||||||
[type="month"],
|
|
||||||
[type="search"],
|
|
||||||
[type="tel"],
|
|
||||||
[type="time"],
|
|
||||||
[type="week"],
|
|
||||||
[multiple],
|
|
||||||
textarea,
|
|
||||||
select {
|
|
||||||
@apply rounded-md bg-gray-100 dark:bg-gray-700
|
|
||||||
dark:border-gray-600 border-gray-300 border-2
|
dark:border-gray-600 border-gray-300 border-2
|
||||||
py-2 px-3
|
py-2 px-3
|
||||||
focus:outline-none focus:ring focus:ring-2 focus:border-green-600 focus:ring-green-500
|
focus:outline-none focus:ring focus:ring-2 focus:border-green-600 focus:ring-green-500
|
||||||
|
Loading…
Reference in New Issue
Block a user