chore: use variable for static.ietf.org references (#5692)
This commit is contained in:
parent
5f4dfb87b6
commit
0a11892414
|
@ -66,7 +66,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||||
"forwardPorts": [8000, 5432, 5433],
|
"forwardPorts": [3000, 5432, 5433, 8000, 8001],
|
||||||
|
|
||||||
"portsAttributes": {
|
"portsAttributes": {
|
||||||
"3000": {
|
"3000": {
|
||||||
|
@ -84,6 +84,10 @@
|
||||||
"8000": {
|
"8000": {
|
||||||
"label": "Datatracker",
|
"label": "Datatracker",
|
||||||
"onAutoForward": "notify"
|
"onAutoForward": "notify"
|
||||||
|
},
|
||||||
|
"8001": {
|
||||||
|
"label": "Static",
|
||||||
|
"onAutoForward": "silent"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -59,6 +59,12 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- ./docker/configs/pgadmin-servers.json:/pgadmin4/servers.json
|
- ./docker/configs/pgadmin-servers.json:/pgadmin4/servers.json
|
||||||
|
|
||||||
|
static:
|
||||||
|
image: ghcr.io/ietf-tools/static:latest
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- 8001:80
|
||||||
|
|
||||||
mq:
|
mq:
|
||||||
image: rabbitmq:3-alpine
|
image: rabbitmq:3-alpine
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
|
@ -55,3 +55,5 @@ NOMCOM_PUBLIC_KEYS_DIR = 'data/nomcom_keys/public_keys/'
|
||||||
SLIDE_STAGING_PATH = 'test/staging/'
|
SLIDE_STAGING_PATH = 'test/staging/'
|
||||||
|
|
||||||
DE_GFM_BINARY = '/usr/local/bin/de-gfm'
|
DE_GFM_BINARY = '/usr/local/bin/de-gfm'
|
||||||
|
|
||||||
|
STATIC_IETF_ORG = "http://localhost:8001"
|
||||||
|
|
|
@ -627,7 +627,7 @@ class DocumentInfo(models.Model):
|
||||||
stylesheets.append(finders.find("ietf/css/document_html_txt.css"))
|
stylesheets.append(finders.find("ietf/css/document_html_txt.css"))
|
||||||
else:
|
else:
|
||||||
text = self.htmlized()
|
text = self.htmlized()
|
||||||
stylesheets.append("https://static.ietf.org/fonts/noto-sans-mono/import.css")
|
stylesheets.append(f'{settings.STATIC_IETF_ORG}/fonts/noto-sans-mono/import.css')
|
||||||
|
|
||||||
cache = caches["pdfized"]
|
cache = caches["pdfized"]
|
||||||
cache_key = name.split(".")[0]
|
cache_key = name.split(".")[0]
|
||||||
|
|
|
@ -137,7 +137,6 @@ IETF_NOTES_URL = 'https://notes.ietf.org/' # HedgeDoc base URL
|
||||||
# Absolute path to the directory static files should be collected to.
|
# Absolute path to the directory static files should be collected to.
|
||||||
# Example: "/var/www/example.com/static/"
|
# Example: "/var/www/example.com/static/"
|
||||||
|
|
||||||
|
|
||||||
SERVE_CDN_PHOTOS = True
|
SERVE_CDN_PHOTOS = True
|
||||||
|
|
||||||
SERVE_CDN_FILES_LOCALLY_IN_DEV_MODE = True
|
SERVE_CDN_FILES_LOCALLY_IN_DEV_MODE = True
|
||||||
|
@ -157,6 +156,8 @@ STATICFILES_FINDERS = (
|
||||||
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
STATIC_IETF_ORG = "https://static.ietf.org"
|
||||||
|
|
||||||
WSGI_APPLICATION = "ietf.wsgi.application"
|
WSGI_APPLICATION = "ietf.wsgi.application"
|
||||||
|
|
||||||
AUTHENTICATION_BACKENDS = ( 'ietf.ietfauth.backends.CaseInsensitiveModelBackend', )
|
AUTHENTICATION_BACKENDS = ( 'ietf.ietfauth.backends.CaseInsensitiveModelBackend', )
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
{% block title %}No title{% endblock %}
|
{% block title %}No title{% endblock %}
|
||||||
</title>
|
</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link href="https://static.ietf.org/fonts/inter/import.css" rel="stylesheet">
|
<link href="{{ settings.STATIC_IETF_ORG }}/fonts/inter/import.css" rel="stylesheet">
|
||||||
<link href="https://static.ietf.org/fonts/noto-sans-mono/import.css" rel="stylesheet">
|
<link href="{{ settings.STATIC_IETF_ORG }}/fonts/noto-sans-mono/import.css" rel="stylesheet">
|
||||||
<link rel="stylesheet" href="{% static 'ietf/css/ietf.css' %}">
|
<link rel="stylesheet" href="{% static 'ietf/css/ietf.css' %}">
|
||||||
<link rel="stylesheet" href="{% static 'ietf/css/select2.css' %}">
|
<link rel="stylesheet" href="{% static 'ietf/css/select2.css' %}">
|
||||||
<style>
|
<style>
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</title>
|
</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link href="https://static.ietf.org/fonts/inter/import.css" rel="stylesheet">
|
<link href="{{ settings.STATIC_IETF_ORG }}/fonts/inter/import.css" rel="stylesheet">
|
||||||
<link href="https://static.ietf.org/fonts/noto-sans-mono/import.css" rel="stylesheet">
|
<link href="{{ settings.STATIC_IETF_ORG }}/fonts/noto-sans-mono/import.css" rel="stylesheet">
|
||||||
{% if request.COOKIES.pagedeps == 'inline' %}
|
{% if request.COOKIES.pagedeps == 'inline' %}
|
||||||
<script>{{ js|safe }}</script>
|
<script>{{ js|safe }}</script>
|
||||||
<style>{{ css|safe }}</style>
|
<style>{{ css|safe }}</style>
|
||||||
|
|
Loading…
Reference in a new issue