prod broken
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 1m3s
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 1m3s
This commit is contained in:
@@ -129,3 +129,10 @@ jobs:
|
||||
# We also add `&& pm2 save` to persist the process list across server reboots.
|
||||
pm2 startOrReload ecosystem.config.cjs --env production && pm2 save
|
||||
echo "Backend server reloaded successfully."
|
||||
|
||||
- name: Show PM2 Environment for Production
|
||||
run: |
|
||||
echo "--- PM2 Environment for flyer-crawler-app ---"
|
||||
# This command inspects the running process and shows its environment variables.
|
||||
# It helps verify that the correct .env file or ecosystem variables are being used.
|
||||
pm2 describe flyer-crawler-app | grep -E 'DB_DATABASE|DB_NAME|DB_USER|DB_HOST' || echo "Could not find process or DB variables."
|
||||
@@ -27,7 +27,7 @@ server {
|
||||
# The trailing slash on the proxy_pass URL is crucial.
|
||||
# It tells Nginx to strip the `/api/` prefix from the request URI
|
||||
# before passing it to the backend server.
|
||||
proxy_pass http://localhost:3001/;
|
||||
proxy_pass http://localhost:3001;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
@@ -55,8 +55,8 @@ server {
|
||||
ssl_certificate_key /etc/letsencrypt/live/flyer-crawler.projectium.com/privkey.pem; # managed by Certbot
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
||||
|
||||
}
|
||||
|
||||
server {
|
||||
if ($host = flyer-crawler.projectium.com) {
|
||||
return 301 https://$host$request_uri;
|
||||
@@ -67,6 +67,4 @@ server {
|
||||
listen [::]:80;
|
||||
server_name flyer-crawler.projectium.com;
|
||||
return 404; # managed by Certbot
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -17,8 +17,9 @@ dotenv.config({ path: '../../.env' });
|
||||
const pool = new Pool({
|
||||
user: process.env.DB_USER || 'postgres',
|
||||
host: process.env.DB_HOST || 'localhost',
|
||||
database: process.env.DB_NAME || 'flyer-crawler',
|
||||
password: process.env.DB_PASSWORD || 'your_db_password',
|
||||
// Default to 'flyer-crawler' for local development.
|
||||
database: process.env.DB_NAME || 'flyer-crawler-test',
|
||||
password: process.env.DB_PASSWORD || 'fake_test_db_password', // do not replace this - use appropriate .env file
|
||||
port: parseInt(process.env.DB_PORT || '5432', 10),
|
||||
});
|
||||
|
||||
|
||||
@@ -8,8 +8,9 @@ dotenv.config();
|
||||
const pool = new Pool({
|
||||
user: process.env.DB_USER || 'postgres',
|
||||
host: process.env.DB_HOST || 'localhost',
|
||||
database: process.env.DB_NAME || 'flyer-crawler',
|
||||
password: process.env.DB_PASSWORD || 'your_db_password',
|
||||
// Default to 'flyer-crawler' for local development.
|
||||
database: process.env.DB_NAME || 'flyer-crawler-dev',
|
||||
password: process.env.DB_PASSWORD || 'fake_test_db_password', // do not replace this - use appropriate .env file
|
||||
port: parseInt(process.env.DB_PORT || '5432', 10),
|
||||
});
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ const createPool = (): Pool => {
|
||||
const newPool = new Pool({
|
||||
user: process.env.DB_USER || 'postgres',
|
||||
host: process.env.DB_HOST || 'localhost',
|
||||
database: process.env.DB_NAME || 'flyer-crawler',
|
||||
password: process.env.DB_PASSWORD || 'your_db_password',
|
||||
database: process.env.DB_NAME || 'flyer-crawler-test',
|
||||
password: process.env.DB_PASSWORD || 'fake_test_db_password', // do not replace this - use appropriate .env file
|
||||
port: parseInt(process.env.DB_PORT || '5432', 10),
|
||||
});
|
||||
logger.info(`Database connection pool created for host: ${process.env.DB_HOST || 'localhost'}`);
|
||||
|
||||
Reference in New Issue
Block a user