Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
42d605d19f | ||
| 749350df7f | |||
|
|
ac085100fe | ||
| ce4ecd1268 | |||
|
|
a57cfc396b | ||
| 987badbf8d |
@@ -94,7 +94,8 @@
|
|||||||
"mcp__filesystem__edit_file",
|
"mcp__filesystem__edit_file",
|
||||||
"Bash(timeout 300 tail:*)",
|
"Bash(timeout 300 tail:*)",
|
||||||
"mcp__filesystem__list_allowed_directories",
|
"mcp__filesystem__list_allowed_directories",
|
||||||
"mcp__memory__add_observations"
|
"mcp__memory__add_observations",
|
||||||
|
"Bash(ssh:*)"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -37,3 +37,4 @@ test-output.txt
|
|||||||
Thumbs.db
|
Thumbs.db
|
||||||
.claude
|
.claude
|
||||||
nul
|
nul
|
||||||
|
tmpclaude*
|
||||||
|
|||||||
@@ -71,7 +71,8 @@ module.exports = {
|
|||||||
exp_backoff_restart_delay: 100,
|
exp_backoff_restart_delay: 100,
|
||||||
min_uptime: '10s',
|
min_uptime: '10s',
|
||||||
env: {
|
env: {
|
||||||
NODE_ENV: 'test',
|
NODE_ENV: 'staging',
|
||||||
|
PORT: 3002,
|
||||||
WORKER_LOCK_DURATION: '120000',
|
WORKER_LOCK_DURATION: '120000',
|
||||||
...sharedEnv,
|
...sharedEnv,
|
||||||
},
|
},
|
||||||
@@ -89,7 +90,7 @@ module.exports = {
|
|||||||
exp_backoff_restart_delay: 100,
|
exp_backoff_restart_delay: 100,
|
||||||
min_uptime: '10s',
|
min_uptime: '10s',
|
||||||
env: {
|
env: {
|
||||||
NODE_ENV: 'test',
|
NODE_ENV: 'staging',
|
||||||
...sharedEnv,
|
...sharedEnv,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -106,7 +107,7 @@ module.exports = {
|
|||||||
exp_backoff_restart_delay: 100,
|
exp_backoff_restart_delay: 100,
|
||||||
min_uptime: '10s',
|
min_uptime: '10s',
|
||||||
env: {
|
env: {
|
||||||
NODE_ENV: 'test',
|
NODE_ENV: 'staging',
|
||||||
...sharedEnv,
|
...sharedEnv,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -0,0 +1,69 @@
|
|||||||
|
# HTTPS Server Block (main)
|
||||||
|
server {
|
||||||
|
listen 443 ssl;
|
||||||
|
listen [::]:443 ssl;
|
||||||
|
server_name flyer-crawler-test.projectium.com;
|
||||||
|
|
||||||
|
# SSL Configuration (managed by Certbot)
|
||||||
|
ssl_certificate /etc/letsencrypt/live/flyer-crawler-test.projectium.com/fullchain.pem;
|
||||||
|
ssl_certificate_key /etc/letsencrypt/live/flyer-crawler-test.projectium.com/privkey.pem;
|
||||||
|
include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||||
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
||||||
|
|
||||||
|
# Allow large file uploads (e.g., for flyers)
|
||||||
|
client_max_body_size 100M;
|
||||||
|
|
||||||
|
# Root directory for built application files
|
||||||
|
root /var/www/flyer-crawler-test.projectium.com;
|
||||||
|
index index.html;
|
||||||
|
|
||||||
|
# Deny access to all dotfiles
|
||||||
|
location ~ /\. {
|
||||||
|
deny all;
|
||||||
|
return 404;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Coverage report (must come before generic location /)
|
||||||
|
location /coverage/ {
|
||||||
|
try_files $uri $uri/ =404;
|
||||||
|
}
|
||||||
|
|
||||||
|
# SPA fallback for React Router
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Reverse proxy for backend API
|
||||||
|
location /api/ {
|
||||||
|
proxy_connect_timeout 300s;
|
||||||
|
proxy_send_timeout 300s;
|
||||||
|
proxy_read_timeout 300s;
|
||||||
|
|
||||||
|
proxy_pass http://localhost:3002;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection 'upgrade';
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_cache_bypass $http_upgrade;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Correct MIME type for .mjs files
|
||||||
|
location ~ \.mjs$ {
|
||||||
|
include /etc/nginx/mime.types;
|
||||||
|
default_type application/javascript;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Security headers
|
||||||
|
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||||
|
add_header X-XSS-Protection "1; mode=block" always;
|
||||||
|
add_header X-Content-Type-Options "nosniff" always;
|
||||||
|
}
|
||||||
|
|
||||||
|
# HTTP to HTTPS Redirect
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
listen [::]:80;
|
||||||
|
server_name flyer-crawler-test.projectium.com;
|
||||||
|
|
||||||
|
return 301 https://$host$request_uri;
|
||||||
|
}
|
||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "flyer-crawler",
|
"name": "flyer-crawler",
|
||||||
"version": "0.9.104",
|
"version": "0.9.107",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "flyer-crawler",
|
"name": "flyer-crawler",
|
||||||
"version": "0.9.104",
|
"version": "0.9.107",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@bull-board/api": "^6.14.2",
|
"@bull-board/api": "^6.14.2",
|
||||||
"@bull-board/express": "^6.14.2",
|
"@bull-board/express": "^6.14.2",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "flyer-crawler",
|
"name": "flyer-crawler",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.9.104",
|
"version": "0.9.107",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "concurrently \"npm:start:dev\" \"vite\"",
|
"dev": "concurrently \"npm:start:dev\" \"vite\"",
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ const workerSchema = z.object({
|
|||||||
* Server configuration schema.
|
* Server configuration schema.
|
||||||
*/
|
*/
|
||||||
const serverSchema = z.object({
|
const serverSchema = z.object({
|
||||||
nodeEnv: z.enum(['development', 'production', 'test']).default('development'),
|
nodeEnv: z.enum(['development', 'production', 'test', 'staging']).default('development'),
|
||||||
port: intWithDefault(3001),
|
port: intWithDefault(3001),
|
||||||
frontendUrl: z.string().url().optional(),
|
frontendUrl: z.string().url().optional(),
|
||||||
baseUrl: z.string().optional(),
|
baseUrl: z.string().optional(),
|
||||||
@@ -318,6 +318,11 @@ export const isTest = config.server.nodeEnv === 'test';
|
|||||||
*/
|
*/
|
||||||
export const isDevelopment = config.server.nodeEnv === 'development';
|
export const isDevelopment = config.server.nodeEnv === 'development';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if running in staging environment.
|
||||||
|
*/
|
||||||
|
export const isStaging = config.server.nodeEnv === 'staging';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if SMTP is configured (all required fields present).
|
* Returns true if SMTP is configured (all required fields present).
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user