mirror of
https://github.com/hpware/news-analyze.git
synced 2025-07-16 15:39:06 +00:00
Delete funding.yml as the Lawsnotes thingy & Update README & Wipedev
Some checks failed
Build and Push Beta Image / build-and-push (push) Has been cancelled
Some checks failed
Build and Push Beta Image / build-and-push (push) Has been cancelled
scripts to give windows ppl a script to use & add MORE docker-compose files :D also updated deploy.md & gitignore, but the groq api thing is still broken tho.
This commit is contained in:
parent
fe9cb6e588
commit
0c904fd5bd
15 changed files with 276 additions and 248 deletions
BIN
.github/README/error1.png
vendored
Normal file
BIN
.github/README/error1.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 MiB |
1
.github/funding.yml
vendored
1
.github/funding.yml
vendored
|
@ -1 +0,0 @@
|
|||
ko_fi: howard00
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -37,3 +37,4 @@ _dt_*.py
|
|||
# Testing files
|
||||
test.vue
|
||||
100106_lt_test.html
|
||||
dump.txt
|
||||
|
|
|
@ -62,6 +62,11 @@ Here is the GitHub Issue: https://github.com/hpware/news-analyze/issues/2
|
|||
### Groq API not loading to .env for some reasons.
|
||||
If the user did not load a GROQ api, the summerizing system will just fail outright. Fixing this rn.
|
||||
|
||||
### When using the desktop in the dev env it pops up an error
|
||||

|
||||
|
||||
For some reasons, Nuxt's dev env prev does not display this error, but with the newer ones, it started displaying this error, please run `./wipedev.sh` or `./wipedev.bat` and restart the dev server. (And this is only a temp fix, I have no idea how can I fix this, if you have a fix, please submit a PR thx.)
|
||||
|
||||
## Why?
|
||||
|
||||
We'll use this news article from May 7th 2025 as an example:
|
||||
|
|
|
@ -21,6 +21,8 @@ sudo apt-get update
|
|||
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
||||
```
|
||||
4. Download the docker-compose.yml and .env.example file to an dir & change the .env.example file to .env:
|
||||
|
||||
psst: You can change the docker-compose file to different systems, these are available: `docker-compose.yml`, `docker-compose-no-traefik.yml`, `docker-compose-beta.yml`, `docker-compose-beta-no-traefik.yml`
|
||||
```bash
|
||||
# Chahnge your_dir to your dir in your server!
|
||||
mkdir ./your_dir
|
||||
|
|
14
docker-compose-beta-no-traefik.yml
Executable file
14
docker-compose-beta-no-traefik.yml
Executable file
|
@ -0,0 +1,14 @@
|
|||
services:
|
||||
service:
|
||||
image: ghcr.io/hpware/news-analyze:beta
|
||||
ports:
|
||||
- 36695:3000 # CHANGE YOUR PORT HERE
|
||||
restart: unless-stopped
|
||||
# Use only one node to ease development, as this is not for prod use.
|
||||
env_file:
|
||||
- path: ./.env
|
||||
required: true
|
||||
networks:
|
||||
- n3abetaweb
|
||||
networks:
|
||||
n3abetaweb: null
|
|
@ -2,32 +2,28 @@ services:
|
|||
reverse-proxy:
|
||||
image: traefik:v3.1
|
||||
command:
|
||||
- "--providers.docker"
|
||||
- "--providers.docker.exposedbydefault=false"
|
||||
- "--entrypoints.web.address=:80"
|
||||
- --providers.docker
|
||||
- --providers.docker.exposedbydefault=false
|
||||
- --entrypoints.web.address=:80
|
||||
ports:
|
||||
- 127.0.0.1:36694:80
|
||||
- 127.0.0.1:36695:80
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
networks:
|
||||
- web
|
||||
|
||||
newsanalyze-service:
|
||||
- n3abetaweb
|
||||
service:
|
||||
image: ghcr.io/hpware/news-analyze:beta
|
||||
networks:
|
||||
- web
|
||||
- n3abetaweb
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.newsanalyze.rule=Host(`news.yuanhau.com`)"
|
||||
- "traefik.http.services.newsanalyze.loadbalancer.server.port=3000"
|
||||
- "com.centurylinklabs.watchtower.enable=true"
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.newsanalyzebeat.rule=Host(`YOUR_HOSTNAME_HERE`) # YOUR HOSTNAME HERE
|
||||
- traefik.http.services.newsanalyzebeta.loadbalancer.server.port=3000
|
||||
- com.centurylinklabs.watchtower.enable=true
|
||||
restart: unless-stopped
|
||||
# Use only one node to ease development, as this is not for prod use.
|
||||
env_file:
|
||||
- path: ./.env
|
||||
required: true
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 2
|
||||
|
||||
networks:
|
||||
web:
|
||||
n3abetaweb: null
|
||||
|
|
14
docker-compose-no-traefik.yml
Executable file
14
docker-compose-no-traefik.yml
Executable file
|
@ -0,0 +1,14 @@
|
|||
services:
|
||||
newsanalyze-service:
|
||||
image: ghcr.io/hpware/news-analyze:latest
|
||||
ports:
|
||||
- 36694:80 # CHANGE YOUR PORT HERE
|
||||
networks:
|
||||
- web
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- path: ./.env
|
||||
required: true
|
||||
|
||||
networks:
|
||||
web:
|
|
@ -18,7 +18,7 @@ services:
|
|||
- web
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.newsanalyze.rule=Host(`news.yuanhau.com`)"
|
||||
- "traefik.http.routers.newsanalyze.rule=Host(`YOUR_HOSTNAME_HERE`)" # CHANGE TO YOUR HOSTNAME
|
||||
- "traefik.http.services.newsanalyze.loadbalancer.server.port=3000"
|
||||
- "com.centurylinklabs.watchtower.enable=true"
|
||||
restart: unless-stopped
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"docs:dev": "vitepress dev docs",
|
||||
"docs:build": "vitepress build docs",
|
||||
"docs:preview": "vitepress preview docs",
|
||||
"wipedev": "./clean-dev-env.sh",
|
||||
"wipedev": "./wipedev.sh",
|
||||
"generateVersionTag": "bun run versionTagGenerate.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -500,7 +500,7 @@ const toggleMinWindow = (windowUUId: string) => {
|
|||
component: activeWindow.component,
|
||||
name: activeWindow.name,
|
||||
title: activeWindow.title,
|
||||
width: activeWindow.width,
|
||||
width: activeWindow.width, // HUH THIS IS CAUSING THE ERROR????
|
||||
height: activeWindow.height,
|
||||
black: activeWindow.black || false,
|
||||
translatable: activeWindow.translatable || false,
|
||||
|
|
|
@ -2,10 +2,6 @@ import { Groq } from "groq-sdk";
|
|||
import sql from "~/server/components/postgres";
|
||||
import { checkIfUserHasCustomGroqKey } from "~/server/components/customgroqsystem";
|
||||
|
||||
const groq = new Groq({
|
||||
apiKey: process.env.GROQ_API_KEY,
|
||||
});
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const host = getRequestHost(event);
|
||||
const protocol = getRequestProtocol(event);
|
||||
|
@ -14,13 +10,12 @@ export default defineEventHandler(async (event) => {
|
|||
console.log("Token: ", userToken);
|
||||
const doesTheUserHasACustomGroqApiAndWhatIsIt =
|
||||
await checkIfUserHasCustomGroqKey(userToken);
|
||||
let groqClient = groq;
|
||||
let groqClient;
|
||||
if (doesTheUserHasACustomGroqApiAndWhatIsIt.status === true) {
|
||||
groqClient = new Groq({
|
||||
apiKey: doesTheUserHasACustomGroqApiAndWhatIsIt.customApi,
|
||||
});
|
||||
} else {
|
||||
console.log(process.env.GROQ_API_KEY); // DEBUGGING ONLY!!! THIS ONLY CONTAINS THE .ENV KEYS NOT THE USER ONES
|
||||
groqClient = new Groq({
|
||||
apiKey: process.env.GROQ_API_KEY,
|
||||
});
|
||||
|
|
6
wipedev.bat
Normal file
6
wipedev.bat
Normal file
|
@ -0,0 +1,6 @@
|
|||
@REM THis file is AI generated
|
||||
rmdir /s /q node_modules
|
||||
del /f /q bun.lock
|
||||
rmdir /s /q .nuxt
|
||||
rmdir /s /q .output
|
||||
bun install
|
Loading…
Add table
Add a link
Reference in a new issue