fixes
This commit is contained in:
parent
ddd5f890f5
commit
92cec1bf65
3 changed files with 5 additions and 23 deletions
|
|
@ -26,9 +26,9 @@ import (
|
||||||
// @BasePath /
|
// @BasePath /
|
||||||
func main() {
|
func main() {
|
||||||
// Try to load .local.env first, then fallback to .env
|
// Try to load .local.env first, then fallback to .env
|
||||||
if err := godotenv.Load(".local.env"); err != nil {
|
if err := godotenv.Load("../../.local.env"); err != nil {
|
||||||
log.Println("No .local.env file found, trying .env")
|
log.Println("No .local.env file found, trying .env")
|
||||||
if err := godotenv.Load(".env"); err != nil {
|
if err := godotenv.Load("../../.env"); err != nil {
|
||||||
log.Println("No .env file found, using system environment variables")
|
log.Println("No .env file found, using system environment variables")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
# Database Configuration
|
|
||||||
DB_HOST=postgres
|
|
||||||
DB_PORT=5432
|
|
||||||
DB_NAME=jobs_scraper
|
|
||||||
DB_USER=postgres
|
|
||||||
DB_PASSWORD=postgres
|
|
||||||
|
|
||||||
# OpenRouter Configuration (for job description extraction)
|
|
||||||
OPENROUTER_API_KEY=your_openrouter_api_key_here
|
|
||||||
CV_AI_MODEL=google/gemini-flash-1.5
|
|
||||||
|
|
||||||
# Optional: OpenAI Configuration (alternative to OpenRouter)
|
|
||||||
# OPENAI_API_KEY=your_openai_api_key_here
|
|
||||||
# OPENAI_BASE_URL=https://api.openai.com/v1
|
|
||||||
|
|
||||||
# Chrome/Chromedp Configuration (usually defaults are fine)
|
|
||||||
CHROMEDP_DISABLE_GPU=true
|
|
||||||
CHROMEDP_NO_SANDBOX=true
|
|
||||||
|
|
@ -17,9 +17,9 @@ func Work(mainCtx context.Context) func(page int, stream chan<- domain.GoogleLin
|
||||||
|
|
||||||
opts := append(chromedp.DefaultExecAllocatorOptions[:],
|
opts := append(chromedp.DefaultExecAllocatorOptions[:],
|
||||||
chromedp.Flag("headless", true),
|
chromedp.Flag("headless", true),
|
||||||
chromedp.Flag("no-sandbox", true), // Required for Docker
|
chromedp.Flag("no-sandbox", true),
|
||||||
chromedp.Flag("disable-gpu", true), // Recommended for Docker
|
chromedp.Flag("disable-gpu", true),
|
||||||
chromedp.Flag("disable-dev-shm-usage", true), // Prevents crashes in Docker
|
chromedp.Flag("disable-dev-shm-usage", true),
|
||||||
chromedp.Flag("disable-blink-features", "AutomationControlled"),
|
chromedp.Flag("disable-blink-features", "AutomationControlled"),
|
||||||
chromedp.Flag("excludeSwitches", "enable-automation"),
|
chromedp.Flag("excludeSwitches", "enable-automation"),
|
||||||
chromedp.Flag("disable-web-security", false),
|
chromedp.Flag("disable-web-security", false),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue