Add glance stack
This commit is contained in:
5
apps/hydra/glance/kustomization.yaml
Normal file
5
apps/hydra/glance/kustomization.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
metadata: {}
|
||||
resources:
|
||||
- namespace.yaml
|
||||
6
apps/hydra/glance/namespace.yaml
Normal file
6
apps/hydra/glance/namespace.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: glance
|
||||
spec: {}
|
||||
status: {}
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"os"
|
||||
|
||||
"danicos.dev/daniel/go-kube/pkg/stack"
|
||||
glance "danicos.dev/daniel/homelab/pkg"
|
||||
"danicos.dev/daniel/homelab/pkg/cnpg"
|
||||
"danicos.dev/daniel/homelab/pkg/flux"
|
||||
"danicos.dev/daniel/homelab/pkg/immich"
|
||||
@@ -41,6 +42,7 @@ func main() {
|
||||
hydra_apps := map[string]stack.Stack{
|
||||
"linkding": linkding.Stack(),
|
||||
"immich": immich.Stack(),
|
||||
"glance": glance.Stack(),
|
||||
}
|
||||
for name, s := range hydra_apps {
|
||||
fmt.Printf("STACK: %s\n", name)
|
||||
|
||||
3
config/glance/.env
Normal file
3
config/glance/.env
Normal file
@@ -0,0 +1,3 @@
|
||||
# Variables defined here will be available to use anywhere in the config with the syntax ${MY_SECRET_TOKEN}
|
||||
# Note: making changes to this file requires re-running docker compose up
|
||||
MY_SECRET_TOKEN=123456
|
||||
0
config/glance/assets/user.css
Normal file
0
config/glance/assets/user.css
Normal file
12
config/glance/config/glance.yml
Normal file
12
config/glance/config/glance.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
server:
|
||||
assets-path: /app/assets
|
||||
|
||||
theme:
|
||||
# Note: assets are cached by the browser, changes to the CSS file
|
||||
# will not be reflected until the browser cache is cleared (Ctrl+F5)
|
||||
custom-css-file: /assets/user.css
|
||||
|
||||
pages:
|
||||
# It's not necessary to create a new file for each page and include it, you can simply
|
||||
# put its contents here, though multiple pages are easier to manage when separated
|
||||
- $include: home.yml
|
||||
88
config/glance/config/home.yml
Normal file
88
config/glance/config/home.yml
Normal file
@@ -0,0 +1,88 @@
|
||||
- name: Home
|
||||
# Optionally, if you only have a single page you can hide the desktop navigation for a cleaner look
|
||||
# hide-desktop-navigation: true
|
||||
columns:
|
||||
- size: small
|
||||
widgets:
|
||||
- type: calendar
|
||||
first-day-of-week: monday
|
||||
|
||||
- type: rss
|
||||
limit: 10
|
||||
collapse-after: 3
|
||||
cache: 12h
|
||||
feeds:
|
||||
- url: https://selfh.st/rss/
|
||||
title: selfh.st
|
||||
- url: https://ciechanow.ski/atom.xml
|
||||
- url: https://www.joshwcomeau.com/rss.xml
|
||||
title: Josh Comeau
|
||||
- url: https://samwho.dev/rss.xml
|
||||
- url: https://ishadeed.com/feed.xml
|
||||
title: Ahmad Shadeed
|
||||
|
||||
- type: twitch-channels
|
||||
channels:
|
||||
- theprimeagen
|
||||
- j_blow
|
||||
- giantwaffle
|
||||
- cohhcarnage
|
||||
- christitustech
|
||||
- EJ_SA
|
||||
|
||||
- size: full
|
||||
widgets:
|
||||
- type: group
|
||||
widgets:
|
||||
- type: hacker-news
|
||||
- type: lobsters
|
||||
|
||||
- type: videos
|
||||
channels:
|
||||
- UCXuqSBlHAE6Xw-yeJA0Tunw # Linus Tech Tips
|
||||
- UCR-DXc1voovS8nhAvccRZhg # Jeff Geerling
|
||||
- UCsBjURrPoezykLs9EqgamOA # Fireship
|
||||
- UCBJycsmduvYEL83R_U4JriQ # Marques Brownlee
|
||||
- UCHnyfMqiRRG1u-2MsSQLbXA # Veritasium
|
||||
|
||||
- type: group
|
||||
widgets:
|
||||
- type: reddit
|
||||
subreddit: technology
|
||||
show-thumbnails: true
|
||||
- type: reddit
|
||||
subreddit: selfhosted
|
||||
show-thumbnails: true
|
||||
|
||||
- size: small
|
||||
widgets:
|
||||
- type: weather
|
||||
location: London, United Kingdom
|
||||
units: metric # alternatively "imperial"
|
||||
hour-format: 12h # alternatively "24h"
|
||||
# Optionally hide the location from being displayed in the widget
|
||||
# hide-location: true
|
||||
|
||||
- type: markets
|
||||
markets:
|
||||
- symbol: SPY
|
||||
name: S&P 500
|
||||
- symbol: BTC-USD
|
||||
name: Bitcoin
|
||||
- symbol: NVDA
|
||||
name: NVIDIA
|
||||
- symbol: AAPL
|
||||
name: Apple
|
||||
- symbol: MSFT
|
||||
name: Microsoft
|
||||
|
||||
- type: releases
|
||||
cache: 1d
|
||||
# Without authentication the Github API allows for up to 60 requests per hour. You can create a
|
||||
# read-only token from your Github account settings and use it here to increase the limit.
|
||||
# token: ...
|
||||
repositories:
|
||||
- glanceapp/glance
|
||||
- go-gitea/gitea
|
||||
- immich-app/immich
|
||||
- syncthing/syncthing
|
||||
14
config/glance/docker-compose.yml
Normal file
14
config/glance/docker-compose.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
services:
|
||||
glance:
|
||||
container_name: glance
|
||||
image: glanceapp/glance
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./config:/app/config
|
||||
- ./assets:/app/assets
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
# Optionally, also mount docker socket if you want to use the docker containers widget
|
||||
# - /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
ports:
|
||||
- 8080:8080
|
||||
env_file: .env
|
||||
20
pkg/glance.go
Normal file
20
pkg/glance.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package glance
|
||||
|
||||
import (
|
||||
"danicos.dev/daniel/go-kube/pkg/kube"
|
||||
"danicos.dev/daniel/go-kube/pkg/stack"
|
||||
"danicos.dev/daniel/homelab/pkg/root"
|
||||
)
|
||||
|
||||
var meta kube.Metadata
|
||||
var Namespace = kube.Namespace(root.Glance.Name)
|
||||
|
||||
func Stack() stack.Stack {
|
||||
kz := kube.NewKuztomizedStack(
|
||||
meta,
|
||||
map[string]any{
|
||||
"namespace": Namespace,
|
||||
},
|
||||
)
|
||||
return kz.Stack("glance")
|
||||
}
|
||||
@@ -83,7 +83,6 @@ func Stack() stack.Stack {
|
||||
|
||||
func MachineLearning() apps.Deployment {
|
||||
envMapping := map[string]string{
|
||||
// "REDIS_PORT": fmt.Sprintf("%d", RedisPort),
|
||||
"IMMICH_PORT": fmt.Sprintf("%d", MachineLearningPort),
|
||||
}
|
||||
cacheVol := kube.NewVolumeFrom(kube.VolumeSourcePVC, "cache", machine_learning_pvc.Name)
|
||||
|
||||
@@ -43,6 +43,16 @@ var Immich = Service{
|
||||
},
|
||||
}
|
||||
|
||||
var Glance = Service{
|
||||
Name: "glance",
|
||||
Image: "",
|
||||
Port: 0, // Server Port
|
||||
// Public: &Public{
|
||||
// URL: "https://photos.danicos.me",
|
||||
// NodePort: 30011,
|
||||
// },
|
||||
}
|
||||
|
||||
var (
|
||||
Longhorn = "longhorn"
|
||||
Monitoring = "monitoring"
|
||||
|
||||
Reference in New Issue
Block a user