Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update glance #1293

Merged
merged 1 commit into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 7 additions & 50 deletions apps/glance/.env
Original file line number Diff line number Diff line change
@@ -1,53 +1,10 @@
W9_REPO="wordpress"
W9_DIST=community
W9_VERSION="latest"

W9_POWER_PASSWORD="1PrMxExC45LsCT"

# Environments which for user settings when create application
# Named expression: W9_xxx_xxx_SET, xxx refer to file fields
W9_HTTP_PORT_SET=9001
# W9_HTTPS_PORT_SET=9002
# W9_DB_PORT_SET=3306
# W9_SSH_PORT_SET=23
W9_KEY_SET="dfsjdkjf77xjxcjcj"
W9_REPO=glanceapp/glance
W9_DIST='community'
W9_VERSION=latest
W9_HTTP_PORT_SET='9001'

#### -- Not allowed to edit below environments when recreate app based on existing data -- ####

W9_ID=glance

# W9_HTTP_PORT or W9_HTTPS_PORT is need at leaset and used for proxy for web application
# Some container (e.g teleport) need HTTPS access, then need to set this pra
W9_HTTP_PORT=80
W9_HTTPS_PORT=81

W9_LOGIN_USER=admin
# use https://1password.com/zh-cn/password-generator/ to genarate 14 bit password
# this password can also use password file
W9_LOGIN_PASSWORD=$W9_POWER_PASSWORD
W9_ADMIN_PATH="/wp-login"

# Container name's suffix must use one of the value
W9_DB_EXPOSE="mysql,postgresql,mariadb,mongodb,redis"

# It is used when the application APP needs to set an external URL, which can be IP(or domain), IP:PORT
# If have protocols, should be set it in the APP's ENV
W9_URL=internet_ip:$W9_HTTP_PORT_SET
# modifies W9_URL on init when it is true
W9_URL_REPLACE=true

W9_ID='glance'
W9_HTTP_PORT=6989
W9_URL='internet_ip:$W9_HTTP_PORT_SET'
W9_NETWORK=websoft9

#### ----------------------------------------------------------------------------------------- ####


# Below environment is created by this app

WORDPRESS_DB_HOST=$W9_ID-mariadb
WORDPRESS_DB_USER=wordpress #if use postgresql, it need set to postgres
WORDPRESS_DB_PASSWORD=$W9_POWER_PASSWORD
WORDPRESS_DB_NAME=wordpress


#W9_NAME=""
#W9_RCODE=""
21 changes: 0 additions & 21 deletions apps/glance/Dockerfile

This file was deleted.

26 changes: 0 additions & 26 deletions apps/glance/README.jinja2

This file was deleted.

46 changes: 8 additions & 38 deletions apps/glance/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,20 @@
# image,docs: https://hub.docker.com/_/wordpress/
# image: https://hub.docker.com/r/glanceapp/glance
# docs: https://github.com/glanceapp/docker-compose-template/blob/main/root/docker-compose.yml

services:

wordpress:
glance:
image: $W9_REPO:$W9_VERSION
container_name: $W9_ID
restart: unless-stopped
#This is for access host from container
# extra_hosts: ["host.docker.internal:host-gateway"]
# command: |
# /bin/bash -c "ping -c 3 host.docker.internal"
logging:
driver: "json-file"
options:
max-file: "5"
max-size: 10m
deploy:
resources:
limits:
memory: 5g
cpus: '0.7'
ports:
- $W9_HTTP_PORT_SET:80
env_file: .env
ports:
- "$W9_HTTP_PORT_SET:8080"
volumes:
- wordpress:/var/www/html
- ./src/php_exra.ini:/usr/local/etc/php/conf.d/php_exra.ini

mariadb:
image: mariadb:10.4
container_name: $W9_ID-mariadb
- ./src/assets:/app/assets
- ./src/config:/app/config
restart: unless-stopped
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --innodb_log_buffer_size=30M
volumes:
- mysql_data:/var/lib/mysql
environment:
MYSQL_DATABASE: $WORDPRESS_DB_NAME
MYSQL_USER: $WORDPRESS_DB_USER
MYSQL_PASSWORD: $W9_POWER_PASSWORD
MYSQL_ROOT_PASSWORD: $W9_POWER_PASSWORD

volumes:
wordpress:
mysql_data:

networks:
default:
name: $W9_NETWORK
external: true
external: true
Empty file added apps/glance/src/assets/user.css
Empty file.
12 changes: 12 additions & 0 deletions apps/glance/src/config/glance.yml
Original file line number Diff line number Diff line change
@@ -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
91 changes: 91 additions & 0 deletions apps/glance/src/config/home.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
- 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
- piratesoftware
- 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
# The link to go to when clicking on the symbol in the UI,
# {SYMBOL} will be substituded with the symbol for each market
symbol-link-template: https://www.tradingview.com/symbols/{SYMBOL}/news
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
57 changes: 0 additions & 57 deletions apps/glance/src/nginx-proxy.conf.template

This file was deleted.

8 changes: 0 additions & 8 deletions apps/glance/src/php_exra.ini

This file was deleted.