Compare commits
6 Commits
dependabot
...
issue/kube
Author | SHA1 | Date | |
---|---|---|---|
73ead23269 | |||
5a2917d028 | |||
0e3d0601b9 | |||
b1f33c9607 | |||
b8580c2c9b | |||
f3ac083f3e |
@@ -1,5 +1,4 @@
|
||||
<header id="header">
|
||||
|
||||
<div class="h-card p-author">
|
||||
<data class="u-photo" value="{{ local_actor.icon_url }}"></data>
|
||||
<a href="{{ local_actor.url }}" class="u-url u-uid no-hover title">
|
||||
@@ -46,6 +45,8 @@
|
||||
{% endif %}
|
||||
{% if not HIDES_FOLLOWERS or is_admin %}
|
||||
<li>{{ header_link("followers", "Followers") }} <span class="counter">{{ followers_count }}</span></li>
|
||||
{% else %}
|
||||
<li>Followers <span class="counter">{{ followers_count }} </span></li>
|
||||
{% endif %}
|
||||
{% if not HIDES_FOLLOWING or is_admin %}
|
||||
<li>{{ header_link("following", "Following") }} <span class="counter">{{ following_count }}</span></li>
|
||||
@@ -58,5 +59,4 @@
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
|
||||
</header>
|
||||
|
@@ -2,7 +2,7 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block head %}
|
||||
<title>{{ local_actor.display_name }}'s microblog</title>
|
||||
<title>{{ local_actor.display_name }}'s posts.</title>
|
||||
<link rel="indieauth-metadata" href="{{ url_for("well_known_authorization_server") }}">
|
||||
<link rel="authorization_endpoint" href="{{ url_for("indieauth_authorization_endpoint") }}">
|
||||
<link rel="token_endpoint" href="{{ url_for("indieauth_token_endpoint") }}">
|
||||
|
@@ -1 +1,13 @@
|
||||
// override vars for theming here
|
||||
$font-stack: Helvetica, sans-serif;
|
||||
$background: #041704;
|
||||
$light-background: #115817;
|
||||
$text-color: #8f8f8f;
|
||||
$primary-color: #33DD3D; // ярко-зелёный акцент
|
||||
$secondary-color: #a259d9; // фиолетовый акцент
|
||||
$form-background-color: #23262f;
|
||||
$form-text-color: #e6e6e6;
|
||||
$muted-color: #888fa6; // приглушённый для комментариев
|
||||
$primary-button-text-color: #181a20;
|
||||
$code-highlight-background: #23262f;
|
||||
|
||||
|
13
microblogpub-certificate.yaml
Normal file
13
microblogpub-certificate.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: microblogpub-tls
|
||||
namespace: microblogpub
|
||||
spec:
|
||||
secretName: microblogpub-tls
|
||||
issuerRef:
|
||||
name: letsencrypt-regru
|
||||
kind: ClusterIssuer
|
||||
dnsNames:
|
||||
- titer.b1-66er.ru
|
||||
|
40
microblogpub-deployment.yaml
Normal file
40
microblogpub-deployment.yaml
Normal file
@@ -0,0 +1,40 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: microblogpub
|
||||
namespace: microblogpub
|
||||
labels:
|
||||
app: microblogpub
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: microblogpub
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: microblogpub
|
||||
spec:
|
||||
securityContext:
|
||||
runAsUser: 1000
|
||||
runAsGroup: 1000
|
||||
containers:
|
||||
- name: microblogpub
|
||||
image: microblogpub:latest
|
||||
imagePullPolicy: Never
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
volumeMounts:
|
||||
- name: data-volume
|
||||
mountPath: /app/data
|
||||
- name: static-volume
|
||||
mountPath: /app/app/static
|
||||
volumes:
|
||||
- name: data-volume
|
||||
hostPath:
|
||||
path: /home/u/server_one/common/b1-66er.tld/data
|
||||
type: DirectoryOrCreate
|
||||
- name: static-volume
|
||||
hostPath:
|
||||
path: /home/u/server_one/common/b1-66er.tld/app/static
|
||||
type: DirectoryOrCreate
|
38
microblogpub-dev.yaml
Normal file
38
microblogpub-dev.yaml
Normal file
@@ -0,0 +1,38 @@
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: microblogpub-compile-css
|
||||
namespace: microblogpub
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: css-compiler
|
||||
image: python:3.11-slim
|
||||
command: ["/bin/bash", "-c"]
|
||||
args:
|
||||
- |
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends curl build-essential gcc libffi-dev libssl-dev libxml2-dev libxslt1-dev zlib1g-dev libxslt-dev gcc libjpeg-dev zlib1g-dev libwebp-dev make git
|
||||
curl -sSL https://install.python-poetry.org | python3 -
|
||||
export PATH="/root/.local/bin:$PATH"
|
||||
cd /app
|
||||
git clone https://git.sr.ht/~tsileo/microblog.pub .
|
||||
poetry install
|
||||
poetry run inv compile-scss
|
||||
cp -r app/static/css/* /compiled-css/
|
||||
volumeMounts:
|
||||
- name: app-data
|
||||
mountPath: /app/data
|
||||
- name: compiled-css
|
||||
mountPath: /compiled-css
|
||||
workingDir: /app
|
||||
volumes:
|
||||
- name: app-data
|
||||
persistentVolumeClaim:
|
||||
claimName: microblogpub-data
|
||||
- name: compiled-css
|
||||
persistentVolumeClaim:
|
||||
claimName: microblogpub-css
|
||||
restartPolicy: Never
|
||||
|
30
microblogpub-ingress.yaml
Normal file
30
microblogpub-ingress.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: microblogpub
|
||||
namespace: microblogpub
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: traefik
|
||||
cert-manager.io/cluster-issuer: letsencrypt-regru
|
||||
traefik.enable: "true"
|
||||
traefik.http.routers.microblogpub.rule: "Host(`titer.b1-66er.ru`)"
|
||||
traefik.http.routers.microblogpub.entrypoints: websecure
|
||||
traefik.http.routers.microblogpub.tls.certresolver: letsencrypt
|
||||
traefik.http.services.microblogpub.loadbalancer.server.port: "8000"
|
||||
spec:
|
||||
ingressClassName: traefik
|
||||
rules:
|
||||
- host: titer.b1-66er.ru
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: microblogpub
|
||||
port:
|
||||
number: 80
|
||||
tls:
|
||||
- secretName: microblogpub-tls
|
||||
hosts:
|
||||
- titer.b1-66er.ru
|
4
microblogpub-namespace.yaml
Normal file
4
microblogpub-namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: microblogpub
|
13
microblogpub-service.yaml
Normal file
13
microblogpub-service.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: microblogpub
|
||||
namespace: microblogpub
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: microblogpub
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8000
|
||||
name: http
|
20
poetry.lock
generated
20
poetry.lock
generated
@@ -1,4 +1,4 @@
|
||||
# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand.
|
||||
# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand.
|
||||
|
||||
[[package]]
|
||||
name = "aiosqlite"
|
||||
@@ -1225,16 +1225,6 @@ files = [
|
||||
{file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:5bbe06f8eeafd38e5d0a4894ffec89378b6c6a625ff57e3028921f8ff59318ac"},
|
||||
{file = "MarkupSafe-2.1.3-cp311-cp311-win32.whl", hash = "sha256:dd15ff04ffd7e05ffcb7fe79f1b98041b8ea30ae9234aed2a9168b5797c3effb"},
|
||||
{file = "MarkupSafe-2.1.3-cp311-cp311-win_amd64.whl", hash = "sha256:134da1eca9ec0ae528110ccc9e48041e0828d79f24121a1a146161103c76e686"},
|
||||
{file = "MarkupSafe-2.1.3-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:f698de3fd0c4e6972b92290a45bd9b1536bffe8c6759c62471efaa8acb4c37bc"},
|
||||
{file = "MarkupSafe-2.1.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:aa57bd9cf8ae831a362185ee444e15a93ecb2e344c8e52e4d721ea3ab6ef1823"},
|
||||
{file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ffcc3f7c66b5f5b7931a5aa68fc9cecc51e685ef90282f4a82f0f5e9b704ad11"},
|
||||
{file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47d4f1c5f80fc62fdd7777d0d40a2e9dda0a05883ab11374334f6c4de38adffd"},
|
||||
{file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1f67c7038d560d92149c060157d623c542173016c4babc0c1913cca0564b9939"},
|
||||
{file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:9aad3c1755095ce347e26488214ef77e0485a3c34a50c5a5e2471dff60b9dd9c"},
|
||||
{file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:14ff806850827afd6b07a5f32bd917fb7f45b046ba40c57abdb636674a8b559c"},
|
||||
{file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8f9293864fe09b8149f0cc42ce56e3f0e54de883a9de90cd427f191c346eb2e1"},
|
||||
{file = "MarkupSafe-2.1.3-cp312-cp312-win32.whl", hash = "sha256:715d3562f79d540f251b99ebd6d8baa547118974341db04f5ad06d5ea3eb8007"},
|
||||
{file = "MarkupSafe-2.1.3-cp312-cp312-win_amd64.whl", hash = "sha256:1b8dd8c3fd14349433c79fa8abeb573a55fc0fdd769133baac1f5e07abf54aeb"},
|
||||
{file = "MarkupSafe-2.1.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8e254ae696c88d98da6555f5ace2279cf7cd5b3f52be2b5cf97feafe883b58d2"},
|
||||
{file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb0932dc158471523c9637e807d9bfb93e06a95cbf010f1a38b98623b929ef2b"},
|
||||
{file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9402b03f1a1b4dc4c19845e5c749e3ab82d5078d16a2a4c2cd2df62d57bb0707"},
|
||||
@@ -1974,7 +1964,7 @@ files = [
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
greenlet = {version = "!=0.4.17", optional = true, markers = "python_version >= \"3\" and (platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\" or extra == \"asyncio\")"}
|
||||
greenlet = {version = "!=0.4.17", optional = true, markers = "python_version >= \"3\" and (platform_machine == \"win32\" or platform_machine == \"WIN32\" or platform_machine == \"AMD64\" or platform_machine == \"amd64\" or platform_machine == \"x86_64\" or platform_machine == \"ppc64le\" or platform_machine == \"aarch64\" or extra == \"asyncio\")"}
|
||||
|
||||
[package.extras]
|
||||
aiomysql = ["aiomysql", "greenlet (!=0.4.17)"]
|
||||
@@ -2196,13 +2186,13 @@ files = [
|
||||
|
||||
[[package]]
|
||||
name = "urllib3"
|
||||
version = "2.0.6"
|
||||
version = "2.0.3"
|
||||
description = "HTTP library with thread-safe connection pooling, file post, and more."
|
||||
optional = false
|
||||
python-versions = ">=3.7"
|
||||
files = [
|
||||
{file = "urllib3-2.0.6-py3-none-any.whl", hash = "sha256:7a7c7003b000adf9e7ca2a377c9688bbc54ed41b985789ed576570342a375cd2"},
|
||||
{file = "urllib3-2.0.6.tar.gz", hash = "sha256:b19e1a85d206b56d7df1d5e683df4a7725252a964e3993648dd0fb5a1c157564"},
|
||||
{file = "urllib3-2.0.3-py3-none-any.whl", hash = "sha256:48e7fafa40319d358848e1bc6809b208340fafe2096f1725d05d67443d0483d1"},
|
||||
{file = "urllib3-2.0.3.tar.gz", hash = "sha256:bee28b5e56addb8226c96f7f13ac28cb4c301dd5ea8a6ca179c0b9835e032825"},
|
||||
]
|
||||
|
||||
[package.extras]
|
||||
|
25
update-microblogpub.sh
Executable file
25
update-microblogpub.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
IMAGE="microblogpub:latest"
|
||||
TAR="microblogpub.tar"
|
||||
NAMESPACE="microblogpub"
|
||||
APP_LABEL="app=microblogpub"
|
||||
|
||||
echo "ℹ️ Пересборка образа…"
|
||||
docker build -t "${IMAGE}" .
|
||||
|
||||
echo "ℹ️ Экспорт в ${TAR}…"
|
||||
docker save "${IMAGE}" -o "${TAR}"
|
||||
|
||||
echo "ℹ️ Импорт в k3s containerd…"
|
||||
sudo k3s ctr images import "${TAR}"
|
||||
|
||||
echo "ℹ️ Очистка tar-файла…"
|
||||
rm -f "${TAR}"
|
||||
|
||||
echo "ℹ️ Перезапуск Pods…"
|
||||
kubectl -n "${NAMESPACE}" rollout restart deployment/microblogpub
|
||||
|
||||
echo "✅ Готово!"
|
||||
|
Reference in New Issue
Block a user