Compare commits
No commits in common. "6e5718bd99ebacf718198f6cca0d504a3d799439" and "b9cfdf54565066fcd90ea5b3527daa2966dcab71" have entirely different histories.
6e5718bd99
...
b9cfdf5456
9 changed files with 20 additions and 93 deletions
|
@ -1,6 +0,0 @@
|
||||||
on: [push]
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
runs-on: docker
|
|
||||||
steps:
|
|
||||||
- run: echo All Good
|
|
|
@ -1,13 +0,0 @@
|
||||||
FROM python:3.11-bookworm
|
|
||||||
LABEL authors="lagertonne"
|
|
||||||
|
|
||||||
ENV PYTHONUNBUFFERED 1
|
|
||||||
RUN mkdir /code
|
|
||||||
WORKDIR /code
|
|
||||||
COPY requirements.dev.txt /code/
|
|
||||||
COPY requirements.prod.txt /code/
|
|
||||||
RUN apt update && apt install -y mariadb-client
|
|
||||||
RUN pip install -r requirements.dev.txt
|
|
||||||
RUN pip install -r requirements.prod.txt
|
|
||||||
RUN pip install mysqlclient
|
|
||||||
COPY . /code/
|
|
|
@ -1,8 +0,0 @@
|
||||||
from prometheus_client import Counter, Gauge
|
|
||||||
from django_prometheus.middleware import (
|
|
||||||
PrometheusAfterMiddleware,
|
|
||||||
)
|
|
||||||
|
|
||||||
class AppMetricsAfterMiddleware(PrometheusAfterMiddleware):
|
|
||||||
def register_metric(self, metric_cls, name, documentation, labelnames=(), **kwargs):
|
|
||||||
return super().register_metric(metric_cls, name, documentation, labelnames=labelnames, **kwargs)
|
|
|
@ -50,7 +50,6 @@ INSTALLED_APPS = [
|
||||||
'django.contrib.messages',
|
'django.contrib.messages',
|
||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
'django_extensions',
|
'django_extensions',
|
||||||
'django_prometheus',
|
|
||||||
'rest_framework',
|
'rest_framework',
|
||||||
'knox',
|
'knox',
|
||||||
'drf_yasg',
|
'drf_yasg',
|
||||||
|
@ -86,7 +85,6 @@ SWAGGER_SETTINGS = {
|
||||||
}
|
}
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
'django_prometheus.middleware.PrometheusBeforeMiddleware',
|
|
||||||
'django.middleware.security.SecurityMiddleware',
|
'django.middleware.security.SecurityMiddleware',
|
||||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||||
'django.middleware.common.CommonMiddleware',
|
'django.middleware.common.CommonMiddleware',
|
||||||
|
@ -94,7 +92,6 @@ MIDDLEWARE = [
|
||||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||||
'django.contrib.messages.middleware.MessageMiddleware',
|
'django.contrib.messages.middleware.MessageMiddleware',
|
||||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||||
'django_prometheus.middleware.PrometheusAfterMiddleware',
|
|
||||||
]
|
]
|
||||||
|
|
||||||
ROOT_URLCONF = 'core.urls'
|
ROOT_URLCONF = 'core.urls'
|
||||||
|
@ -213,6 +210,4 @@ CHANNEL_LAYERS = {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PROMETHEUS_METRIC_NAMESPACE = 'c3lf'
|
|
||||||
|
|
||||||
TEST_RUNNER = 'core.test_runner.FastTestRunner'
|
TEST_RUNNER = 'core.test_runner.FastTestRunner'
|
||||||
|
|
|
@ -18,7 +18,6 @@ from django.contrib import admin
|
||||||
from django.urls import path, include
|
from django.urls import path, include
|
||||||
|
|
||||||
from .version import get_info
|
from .version import get_info
|
||||||
from .metrics import CustomMetrics
|
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path('djangoadmin/', admin.site.urls),
|
path('djangoadmin/', admin.site.urls),
|
||||||
|
@ -33,5 +32,4 @@ urlpatterns = [
|
||||||
path('api/2/', include('notify_sessions.api_v2')),
|
path('api/2/', include('notify_sessions.api_v2')),
|
||||||
path('api/2/', include('authentication.api_v2')),
|
path('api/2/', include('authentication.api_v2')),
|
||||||
path('api/', get_info),
|
path('api/', get_info),
|
||||||
path('', include('django_prometheus.urls')),
|
|
||||||
]
|
]
|
||||||
|
|
|
@ -41,5 +41,3 @@ urllib3==2.1.0
|
||||||
uvicorn==0.24.0.post1
|
uvicorn==0.24.0.post1
|
||||||
watchfiles==0.21.0
|
watchfiles==0.21.0
|
||||||
websockets==12.0
|
websockets==12.0
|
||||||
django-prometheus==2.3.1
|
|
||||||
prometheus_client==0.21.0
|
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
services:
|
|
||||||
core:
|
|
||||||
build:
|
|
||||||
context: ./core
|
|
||||||
dockerfile: Dockerfile.dev
|
|
||||||
command: python manage.py runserver 0.0.0.0:8000
|
|
||||||
#environment:
|
|
||||||
# - DATABASE_URL
|
|
||||||
volumes:
|
|
||||||
- ./core:/code
|
|
||||||
ports:
|
|
||||||
- "8000:8000"
|
|
||||||
|
|
||||||
frontend:
|
|
||||||
build:
|
|
||||||
context: ./web
|
|
||||||
dockerfile: Dockerfile.dev
|
|
||||||
command: npm run serve
|
|
||||||
volumes:
|
|
||||||
- ./web:/web:ro
|
|
||||||
- /web/node_modules
|
|
||||||
ports:
|
|
||||||
- "8080:8080"
|
|
||||||
|
|
||||||
db:
|
|
||||||
image: mariadb
|
|
||||||
environment:
|
|
||||||
MARIADB_RANDOM_ROOT_PASSWORD: true
|
|
||||||
MARIADB_DATABASE: system3
|
|
||||||
MARIADB_USER: system3
|
|
||||||
MARIADB_PASSWORD: system3
|
|
|
@ -1,6 +0,0 @@
|
||||||
FROM docker.io/node:22
|
|
||||||
|
|
||||||
RUN mkdir /web
|
|
||||||
WORKDIR /web
|
|
||||||
COPY package.json /web/
|
|
||||||
RUN npm install
|
|
|
@ -7,25 +7,25 @@ module.exports = {
|
||||||
"Access-Control-Allow-Headers": "*",
|
"Access-Control-Allow-Headers": "*",
|
||||||
"Access-Control-Allow-Methods": "*"
|
"Access-Control-Allow-Methods": "*"
|
||||||
},
|
},
|
||||||
//proxy: {
|
proxy: {
|
||||||
// '^/media/2': {
|
'^/media/2': {
|
||||||
// target: 'https://staging.c3lf.de/',
|
target: 'https://staging.c3lf.de/',
|
||||||
// changeOrigin: true
|
changeOrigin: true
|
||||||
// },
|
},
|
||||||
// '^/api/2': {
|
'^/api/2': {
|
||||||
// target: 'https://staging.c3lf.de/',
|
target: 'https://staging.c3lf.de/',
|
||||||
// changeOrigin: true,
|
changeOrigin: true,
|
||||||
// },
|
},
|
||||||
// '^/api/1': {
|
'^/api/1': {
|
||||||
// target: 'https://staging.c3lf.de/',
|
target: 'https://staging.c3lf.de/',
|
||||||
// changeOrigin: true,
|
changeOrigin: true,
|
||||||
// },
|
},
|
||||||
// '^/ws/2': {
|
'^/ws/2': {
|
||||||
// target: 'http://127.0.0.1:8082/',
|
target: 'http://127.0.0.1:8082/',
|
||||||
// //changeOrigin: true,
|
//changeOrigin: true,
|
||||||
// ws: true,
|
ws: true,
|
||||||
// logLevel: 'debug',
|
logLevel: 'debug',
|
||||||
// },
|
},
|
||||||
//}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue