This commit is contained in:
Your Name committed 2026-06-03 09:28:22 +07:00
1 parent 7b857b4eda
commit fc6bf0218e
2 files changed
+25 -4

No files matched your search

+3 -1
View File
@@ -3,10 +3,12 @@
const fs = require('fs');
const path = require('path');
const { PrismaClient } = require('@prisma/client');
const { Pool } = require('pg');
const { PrismaPg } = require('@prisma/adapter-pg');
const bcrypt = require('bcryptjs');
const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL });
const pool = new Pool({ connectionString: process.env.DATABASE_URL });
const adapter = new PrismaPg(pool);
const prisma = new PrismaClient({ adapter });
const scentNames = [
+22 -3
View File
@@ -1,21 +1,40 @@
server {
listen 80;
server_name homaroma.shop www.homaroma.shop;
location ~ /.well-known/acme-challenge {
allow all;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location / { return 301 https://$host$request_uri; }
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl;
server_name homaroma.shop www.homaroma.shop;
ssl_certificate /etc/letsencrypt/live/homaroma.shop/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/homaroma.shop/privkey.pem;
# Next.js SSR
location / {
proxy_pass http://192.168.1.167:3002;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cache_bypass $http_upgrade;
}
# Next.js static assets caching
location /_next/static/ {
proxy_pass http://192.168.1.167:3002;
proxy_http_version 1.1;
proxy_set_header Host $host;
add_header Cache-Control "public, max-age=31536000, immutable";
}
}