feat: update deployment scripts and README for improved setup and configuration

This commit is contained in:
2026-02-22 03:05:15 +05:00
parent da463e6375
commit 14890b6875
5 changed files with 234 additions and 22 deletions

View File

@@ -1,36 +1,80 @@
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
# FairReview - Steam Game Review Platform
## Getting Started
A gaming-focused website for reviewing Steam games with Steam account integration.
First, run the development server:
## Features
- **Public Access**: Browse games, read reviews
- **Website Account**: Register/login with email, upvote/downvote reviews
- **Steam Integration**: Link Steam account to post reviews with playtime & achievements displayed
## Tech Stack
- Next.js 14 (App Router)
- PostgreSQL (your existing DB at 192.168.2.175:5432)
- NextAuth.js with Credentials + Steam OpenID
- Tailwind CSS (gaming dark theme)
## Quick Deploy
### 1. Upload to Linux Server
Clone this repo to your Linux server.
### 2. Configure Database Credentials
Edit `.postgres-env`:
```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
DB_USER=postgres
DB_PASS=your_actual_password
DB_HOST=192.168.2.175
DB_PORT=5432
DB_NAME=fairreview
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
### 3. Run Deployment
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
```bash
chmod +x deploy.sh
./deploy.sh 192.168.2.175:3000
```
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
### 4. Update Steam API Key
## Learn More
After deployment, edit `.env.local` and add your Steam Web API key:
```
STEAM_API_KEY=your_steam_api_key
```
To learn more about Next.js, take a look at the following resources:
Then restart:
```bash
pm2 restart fairreview
```
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
## Changing Domain Later
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
```bash
./update-domain.sh fairreview.example.com
```
## Deploy on Vercel
## Useful Commands
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
```bash
pm2 status # Check app status
pm2 logs # View logs
pm2 restart fairreview # Restart app
```
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
## Project Structure
```
├── src/
│ ├── app/ # Next.js pages & API routes
│ ├── components/ # UI components
│ └── lib/ # Utilities (db, auth, steam)
├── prisma/
│ └── schema.prisma # Database schema
├── deploy.sh # Main deployment script
├── update-domain.sh # Domain update script
└── .postgres-env # DB credentials (you edit this)
```