prod maint
This commit is contained in:
parent
5f06f9b373
commit
768693f859
21
.env.production
Normal file
21
.env.production
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Настройки Next.js
|
||||||
|
NEXT_PUBLIC_URL=https://kubek.campfiregg.ru
|
||||||
|
NEXT_PUBLIC_API_URL=https://kubek.campfiregg.ru/api
|
||||||
|
|
||||||
|
# Настройки сервера
|
||||||
|
PORT=3000
|
||||||
|
NODE_ENV=production
|
||||||
|
|
||||||
|
# База данных
|
||||||
|
MONGODB_URI=mongodb://localhost:27017/campfire-id
|
||||||
|
|
||||||
|
# Безопасность
|
||||||
|
JWT_SECRET=your-super-secret-key-change-in-production
|
||||||
|
|
||||||
|
# Telegram WebApp
|
||||||
|
NEXT_PUBLIC_BOT_USERNAME=CampFireIDBot
|
||||||
|
NEXT_PUBLIC_BOT_TOKEN=7641998551:AAF_2-av1rUy_-icQ1fsfHOyYBGFt8cEmE4
|
||||||
|
NEXT_PUBLIC_WEBAPP_URL=https://t.me/CampFireIDBot/app
|
||||||
|
|
||||||
|
# Telegram Bot
|
||||||
|
TELEGRAM_BOT_TOKEN=7641998551:AAF_2-av1rUy_-icQ1fsfHOyYBGFt8cEmE4
|
@ -5,7 +5,7 @@ const nextConfig = {
|
|||||||
output: 'standalone',
|
output: 'standalone',
|
||||||
experimental: {
|
experimental: {
|
||||||
serverActions: {
|
serverActions: {
|
||||||
allowedOrigins: ['telegram.org', 't.me'],
|
allowedOrigins: ['telegram.org', 't.me', 'kubek.campfiregg.ru'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
webpack: (config) => {
|
webpack: (config) => {
|
||||||
@ -16,7 +16,7 @@ const nextConfig = {
|
|||||||
return config;
|
return config;
|
||||||
},
|
},
|
||||||
images: {
|
images: {
|
||||||
domains: ['t.me', 'telegram.org'],
|
domains: ['t.me', 'telegram.org', 'kubek.campfiregg.ru'],
|
||||||
},
|
},
|
||||||
async headers() {
|
async headers() {
|
||||||
return [
|
return [
|
||||||
@ -27,6 +27,10 @@ const nextConfig = {
|
|||||||
key: 'Access-Control-Allow-Origin',
|
key: 'Access-Control-Allow-Origin',
|
||||||
value: '*',
|
value: '*',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: 'Content-Security-Policy',
|
||||||
|
value: "default-src 'self' telegram.org *.telegram.org t.me kubek.campfiregg.ru data: 'unsafe-inline' 'unsafe-eval';"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
@ -34,6 +38,11 @@ const nextConfig = {
|
|||||||
typescript: {
|
typescript: {
|
||||||
ignoreBuildErrors: true,
|
ignoreBuildErrors: true,
|
||||||
},
|
},
|
||||||
|
poweredByHeader: false,
|
||||||
|
compress: true,
|
||||||
|
productionBrowserSourceMaps: false,
|
||||||
|
basePath: '',
|
||||||
|
assetPrefix: process.env.NODE_ENV === 'production' ? 'https://kubek.campfiregg.ru' : ''
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = nextConfig
|
module.exports = nextConfig
|
@ -7,7 +7,9 @@
|
|||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"lint": "next lint"
|
"lint": "next lint",
|
||||||
|
"prod:build": "NODE_ENV=production next build",
|
||||||
|
"prod:start": "NODE_ENV=production next start -p 3000"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@chakra-ui/next-js": "^2.2.0",
|
"@chakra-ui/next-js": "^2.2.0",
|
||||||
@ -25,7 +27,7 @@
|
|||||||
"framer-motion": "^11.0.8",
|
"framer-motion": "^11.0.8",
|
||||||
"jsonwebtoken": "^9.0.2",
|
"jsonwebtoken": "^9.0.2",
|
||||||
"mongoose": "^8.2.1",
|
"mongoose": "^8.2.1",
|
||||||
"next": "15.2.2",
|
"next": "13.5.8",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"zod": "^3.22.4"
|
"zod": "^3.22.4"
|
||||||
@ -36,7 +38,7 @@
|
|||||||
"@types/react": "^18.2.61",
|
"@types/react": "^18.2.61",
|
||||||
"@types/react-dom": "^18.2.19",
|
"@types/react-dom": "^18.2.19",
|
||||||
"eslint": "^8.57.0",
|
"eslint": "^8.57.0",
|
||||||
"eslint-config-next": "15.2.2",
|
"eslint-config-next": "13.5.8",
|
||||||
"prettier": "^3.0.3",
|
"prettier": "^3.0.3",
|
||||||
"typescript": "^5.3.3"
|
"typescript": "^5.3.3"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user