Compare commits
1 Commits
issue/kube
...
issue/cust
Author | SHA1 | Date | |
---|---|---|---|
90c96ebf9e |
@@ -1,4 +1,5 @@
|
|||||||
<header id="header">
|
<header id="header">
|
||||||
|
|
||||||
<div class="h-card p-author">
|
<div class="h-card p-author">
|
||||||
<data class="u-photo" value="{{ local_actor.icon_url }}"></data>
|
<data class="u-photo" value="{{ local_actor.icon_url }}"></data>
|
||||||
<a href="{{ local_actor.url }}" class="u-url u-uid no-hover title">
|
<a href="{{ local_actor.url }}" class="u-url u-uid no-hover title">
|
||||||
@@ -45,8 +46,6 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% if not HIDES_FOLLOWERS or is_admin %}
|
{% if not HIDES_FOLLOWERS or is_admin %}
|
||||||
<li>{{ header_link("followers", "Followers") }} <span class="counter">{{ followers_count }}</span></li>
|
<li>{{ header_link("followers", "Followers") }} <span class="counter">{{ followers_count }}</span></li>
|
||||||
{% else %}
|
|
||||||
<li>Followers <span class="counter">{{ followers_count }} </span></li>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if not HIDES_FOLLOWING or is_admin %}
|
{% if not HIDES_FOLLOWING or is_admin %}
|
||||||
<li>{{ header_link("following", "Following") }} <span class="counter">{{ following_count }}</span></li>
|
<li>{{ header_link("following", "Following") }} <span class="counter">{{ following_count }}</span></li>
|
||||||
@@ -59,4 +58,5 @@
|
|||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</header>
|
</header>
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
{% extends "layout.html" %}
|
{% extends "layout.html" %}
|
||||||
|
|
||||||
{% block head %}
|
{% block head %}
|
||||||
<title>{{ local_actor.display_name }}'s posts.</title>
|
<title>{{ local_actor.display_name }}'s microblog</title>
|
||||||
<link rel="indieauth-metadata" href="{{ url_for("well_known_authorization_server") }}">
|
<link rel="indieauth-metadata" href="{{ url_for("well_known_authorization_server") }}">
|
||||||
<link rel="authorization_endpoint" href="{{ url_for("indieauth_authorization_endpoint") }}">
|
<link rel="authorization_endpoint" href="{{ url_for("indieauth_authorization_endpoint") }}">
|
||||||
<link rel="token_endpoint" href="{{ url_for("indieauth_token_endpoint") }}">
|
<link rel="token_endpoint" href="{{ url_for("indieauth_token_endpoint") }}">
|
||||||
|
@@ -1,13 +0,0 @@
|
|||||||
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
|
|
||||||
|
|
@@ -1,40 +0,0 @@
|
|||||||
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
|
|
@@ -1,38 +0,0 @@
|
|||||||
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
|
|
||||||
|
|
@@ -1,30 +0,0 @@
|
|||||||
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
|
|
@@ -1,4 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Namespace
|
|
||||||
metadata:
|
|
||||||
name: microblogpub
|
|
@@ -1,13 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: microblogpub
|
|
||||||
namespace: microblogpub
|
|
||||||
spec:
|
|
||||||
type: ClusterIP
|
|
||||||
selector:
|
|
||||||
app: microblogpub
|
|
||||||
ports:
|
|
||||||
- port: 80
|
|
||||||
targetPort: 8000
|
|
||||||
name: http
|
|
@@ -1,25 +0,0 @@
|
|||||||
#!/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