Compare commits
8 Commits
v1.9.2
..
6f2cfad65f
| Author | SHA1 | Date | |
|---|---|---|---|
| 6f2cfad65f | |||
| 2621d233f9 | |||
| af4997df5a | |||
| 1980fd04ba | |||
| d06d0c76c2 | |||
| 9244328da8 | |||
| 70489c3dac | |||
| 2a3ee1c8af |
@@ -1,9 +1,7 @@
|
|||||||
name: Dev
|
name: Dev
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_dispatch:
|
||||||
branches:
|
|
||||||
- "**"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -33,4 +31,4 @@ jobs:
|
|||||||
|
|
||||||
- name: Deploy to Kubernetes
|
- name: Deploy to Kubernetes
|
||||||
run: |
|
run: |
|
||||||
sudo kubectl replace -f deployment.yml --grace-period=60 --force
|
sudo kubectl replace -f deployment-dev.yml --grace-period=60 --force
|
||||||
@@ -48,7 +48,7 @@ jobs:
|
|||||||
deploy:
|
deploy:
|
||||||
name: Deploy to Kubernetes
|
name: Deploy to Kubernetes
|
||||||
needs: release
|
needs: release
|
||||||
runs-on: k3s-external-htz-01
|
runs-on: k3s-internal-htz-01
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -57,4 +57,4 @@ jobs:
|
|||||||
|
|
||||||
- name: Deploy to Kubernetes
|
- name: Deploy to Kubernetes
|
||||||
run: |
|
run: |
|
||||||
sudo kubectl replace -f deployment.yml --grace-period=60 --force
|
sudo kubectl replace -f deployment-prod.yml --grace-period=60 --force
|
||||||
@@ -40,7 +40,7 @@ docker run -d \
|
|||||||
-e SECRET_KEY=your_secret_key \
|
-e SECRET_KEY=your_secret_key \
|
||||||
-e NAME="Your Organisation" \
|
-e NAME="Your Organisation" \
|
||||||
-e LOGO_PNG="https://example.com/logo.png" \
|
-e LOGO_PNG="https://example.com/logo.png" \
|
||||||
ghcr.io/jdb-net/ipam:latest
|
cr.jdbnet.co.uk/public/ipam:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
### Docker Compose
|
### Docker Compose
|
||||||
@@ -48,7 +48,7 @@ docker run -d \
|
|||||||
```yaml
|
```yaml
|
||||||
services:
|
services:
|
||||||
ipam:
|
ipam:
|
||||||
image: ghcr.io/jdb-net/ipam:latest
|
image: cr.jdbnet.co.uk/public/ipam:latest
|
||||||
container_name: ipam
|
container_name: ipam
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
@@ -247,7 +247,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: ipam
|
- name: ipam
|
||||||
image: ghcr.io/jdb-net/ipam:latest
|
image: cr.jdbnet.co.uk/public/ipam:latest
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 5000
|
- containerPort: 5000
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -0,0 +1,64 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: ipam
|
||||||
|
namespace: ipam
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: ipam
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: ipam
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: ipam
|
||||||
|
image: cr.jdbnet.co.uk/public/ipam:latest
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- containerPort: 5000
|
||||||
|
name: "ipam"
|
||||||
|
env:
|
||||||
|
- name: SECRET_KEY
|
||||||
|
value: "41TbN7v5peFLZPrdwSCc64J3mjmiUk5fkVWsmb2m"
|
||||||
|
- name: MYSQL_HOST
|
||||||
|
value: "10.10.25.4"
|
||||||
|
- name: MYSQL_USER
|
||||||
|
value: "ipam"
|
||||||
|
- name: MYSQL_PASSWORD
|
||||||
|
value: "WXPmo05sGCfjGe"
|
||||||
|
- name: MYSQL_DATABASE
|
||||||
|
value: "ipam"
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: ipam-ingress-service
|
||||||
|
namespace: ipam
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: ipam
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 80
|
||||||
|
targetPort: 5000
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: ipam-ingress
|
||||||
|
namespace: ipam
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: ipam.jdb143.uk
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- pathType: Prefix
|
||||||
|
path: "/"
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: ipam-ingress-service
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
@@ -2615,7 +2615,7 @@ def register_routes(app, limiter=None):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
# Get current version from environment
|
# Get current version from environment
|
||||||
current_version = os.environ.get('VERSION', 'unknown')
|
current_version = os.environ.get('VERSION', 'unknown').lstrip('v')
|
||||||
|
|
||||||
# Fetch latest release from Gitea
|
# Fetch latest release from Gitea
|
||||||
response = requests.get('https://git.jdbnet.co.uk/api/v1/repos/jamie/ipam/releases/latest', timeout=5)
|
response = requests.get('https://git.jdbnet.co.uk/api/v1/repos/jamie/ipam/releases/latest', timeout=5)
|
||||||
|
|||||||
@@ -16,9 +16,9 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
const compareLink = document.getElementById('toast-compare-link');
|
const compareLink = document.getElementById('toast-compare-link');
|
||||||
const closeBtn = document.getElementById('toast-close');
|
const closeBtn = document.getElementById('toast-close');
|
||||||
|
|
||||||
// Set versions
|
// Set versions (don't add 'v' prefix for dev versions)
|
||||||
currentVersionEl.textContent = 'v' + data.current_version;
|
currentVersionEl.textContent = (data.current_version === 'dev' ? '' : 'v') + data.current_version;
|
||||||
latestVersionEl.textContent = 'v' + data.latest_version;
|
latestVersionEl.textContent = (data.latest_version === 'dev' ? '' : 'v') + data.latest_version;
|
||||||
|
|
||||||
// Set compare link (current version to latest version)
|
// Set compare link (current version to latest version)
|
||||||
compareLink.href = `https://git.jdbnet.co.uk/jamie/ipam/compare/v${data.current_version}...v${data.latest_version}`;
|
compareLink.href = `https://git.jdbnet.co.uk/jamie/ipam/compare/v${data.current_version}...v${data.latest_version}`;
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1 +1 @@
|
|||||||
document.addEventListener("DOMContentLoaded",function(){let t=sessionStorage.getItem("update-toast-dismissed");!t&&fetch("/check_update").then(t=>t.json()).then(t=>{if(t.update_available){let e=document.getElementById("update-toast"),n=document.getElementById("toast-current-version"),s=document.getElementById("toast-latest-version"),a=document.getElementById("toast-compare-link"),d=document.getElementById("toast-close");n.textContent="v"+t.current_version,s.textContent="v"+t.latest_version,a.href=`https://git.jdbnet.co.uk/jamie/ipam/compare/v${t.current_version}...v${t.latest_version}`,e.classList.remove("hidden"),d.addEventListener("click",function(){e.classList.add("hidden"),sessionStorage.setItem("update-toast-dismissed","true")})}}).catch(t=>{console.error("Error checking for updates:",t)})});
|
document.addEventListener("DOMContentLoaded",function(){let e=sessionStorage.getItem("update-toast-dismissed");!e&&fetch("/check_update").then(e=>e.json()).then(e=>{if(e.update_available){let t=document.getElementById("update-toast"),n=document.getElementById("toast-current-version"),s=document.getElementById("toast-latest-version"),a=document.getElementById("toast-compare-link"),d=document.getElementById("toast-close");n.textContent=("dev"===e.current_version?"":"v")+e.current_version,s.textContent=("dev"===e.latest_version?"":"v")+e.latest_version,a.href=`https://git.jdbnet.co.uk/jamie/ipam/compare/v${e.current_version}...v${e.latest_version}`,t.classList.remove("hidden"),d.addEventListener("click",function(){t.classList.add("hidden"),sessionStorage.setItem("update-toast-dismissed","true")})}}).catch(e=>{console.error("Error checking for updates:",e)})});
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<img src="{{ LOGO_PNG }}" alt="Logo" class="h-8 rounded">
|
<img src="{{ LOGO_PNG }}" alt="Logo" class="h-8 rounded">
|
||||||
<span class="text-2xl font-bold text-white whitespace-nowrap">{{ NAME }} IPAM</span>
|
<span class="text-2xl font-bold text-white whitespace-nowrap">{{ NAME }} IPAM</span>
|
||||||
</a>
|
</a>
|
||||||
<a href="https://git.jdbnet.co.uk/jamie/ipam/releases" target="_blank" rel="noopener noreferrer" class="text-sm font-normal text-gray-300 hover:text-gray-100 -ml-1 mt-3">v{{ VERSION }}</a>
|
<a href="https://git.jdbnet.co.uk/jamie/ipam/releases" target="_blank" rel="noopener noreferrer" class="text-sm font-normal text-gray-300 hover:text-gray-100 -ml-1 mt-3">{{ VERSION }}</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="hidden lg:flex items-center justify-center absolute left-1/2" style="transform: translateX(calc(-50% + 1.5rem));">
|
<div class="hidden lg:flex items-center justify-center absolute left-1/2" style="transform: translateX(calc(-50% + 1.5rem));">
|
||||||
<form action="/search" method="GET" class="flex items-center space-x-2">
|
<form action="/search" method="GET" class="flex items-center space-x-2">
|
||||||
|
|||||||
Reference in New Issue
Block a user