bundle steam-chat-viewer
This commit is contained in:
parent
e6940b151c
commit
6f9218c5a1
3 changed files with 79 additions and 0 deletions
55
bundles/steam-chat-viewer/metadata.py
Normal file
55
bundles/steam-chat-viewer/metadata.py
Normal file
|
@ -0,0 +1,55 @@
|
|||
from ipaddress import ip_interface
|
||||
|
||||
defaults = {
|
||||
'flask': {
|
||||
'steam-chat-viewer' : {
|
||||
'git_url': "https://git.sublimity.de/cronekorkn/steam-chat-viewer.git",
|
||||
'port': 4001,
|
||||
'app_module': 'steam_chat_viewer',
|
||||
'user': 'steam_chat_viewer',
|
||||
'group': 'steam_chat_viewer',
|
||||
'timeout': 900,
|
||||
'env': {
|
||||
'DB_HOST': 'localhost',
|
||||
'DB_NAME': 'steam_chat_logger',
|
||||
'DB_USER': 'steam_chat_logger',
|
||||
},
|
||||
},
|
||||
},
|
||||
'users': {
|
||||
'steam_chat_viewer': {},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@metadata_reactor.provides(
|
||||
'flask/steam-chat-viewer/env/DB_PASSWORD',
|
||||
)
|
||||
def agent_conf(metadata):
|
||||
return {
|
||||
'flask': {
|
||||
'steam-chat-viewer': {
|
||||
'env': {
|
||||
'DB_PASSWORD': metadata.get('postgresql/roles/steam_chat_logger/password'),
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@metadata_reactor.provides(
|
||||
'nginx/vhosts',
|
||||
)
|
||||
def nginx(metadata):
|
||||
return {
|
||||
'nginx': {
|
||||
'vhosts': {
|
||||
metadata.get('steam-chat-viewer/hostname'): {
|
||||
'content': 'steam-chat-viewer/vhost.conf',
|
||||
'context': {
|
||||
'target': 'http://127.0.0.1:4001',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
20
data/steam-chat-viewer/vhost.conf
Normal file
20
data/steam-chat-viewer/vhost.conf
Normal file
|
@ -0,0 +1,20 @@
|
|||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
|
||||
server_name ${server_name};
|
||||
|
||||
ssl_certificate /var/lib/dehydrated/certs/${server_name}/fullchain.pem;
|
||||
ssl_certificate_key /var/lib/dehydrated/certs/${server_name}/privkey.pem;
|
||||
|
||||
location / {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_pass http://127.0.0.1:4001;
|
||||
}
|
||||
|
||||
location /steamuserimages/ {
|
||||
root /var/lib/steam_chat_logger/steamuserimages;
|
||||
rewrite ^/steamuserimages(.*)$ $1 break;
|
||||
autoindex on;
|
||||
}
|
||||
}
|
|
@ -25,6 +25,7 @@
|
|||
'redis',
|
||||
'smartctl',
|
||||
'steam-chat-logger',
|
||||
'steam-chat-viewer',
|
||||
'raspberrymatic-cert',
|
||||
'tasmota-charge',
|
||||
'wireguard',
|
||||
|
@ -103,6 +104,9 @@
|
|||
'IMAP_USER': 'i@ckn.li',
|
||||
'IMAP_PASSWORD': '!decrypt:encrypt$gAAAAABiUzcTVRL-Xb4RDjcwciZawYlmOa9Qy_hKz6sVWDlwZqUFLGRD8ERWoFCOWCM22Sq73Gc4nFuAblBB6wpbH5YEltLA6hmROGKpOFhI63ESLFwNgbY=',
|
||||
},
|
||||
'steam-chat-viewer': {
|
||||
'hostname': 'steam-chats.ckn.li',
|
||||
},
|
||||
'tasmota-charge': {
|
||||
'phone': {
|
||||
'ip': '10.0.0.175',
|
||||
|
|
Loading…
Reference in a new issue