initial production version
This commit is contained in:
71
SETUP.md
Normal file
71
SETUP.md
Normal file
@@ -0,0 +1,71 @@
|
||||
# Setup Guide
|
||||
|
||||
## Docker (Recommended)
|
||||
|
||||
```bash
|
||||
docker-compose up -d
|
||||
docker-compose exec app bun run db:push
|
||||
```
|
||||
|
||||
Visit `http://localhost:3000`
|
||||
|
||||
## Local Development
|
||||
|
||||
### 1. Install PostgreSQL
|
||||
|
||||
Choose one:
|
||||
|
||||
**Local PostgreSQL:**
|
||||
```bash
|
||||
sudo apt install postgresql
|
||||
sudo -u postgres createdb wishlist
|
||||
sudo -u postgres psql
|
||||
CREATE USER wishlistuser WITH PASSWORD 'password';
|
||||
GRANT ALL PRIVILEGES ON DATABASE wishlist TO wishlistuser;
|
||||
\q
|
||||
```
|
||||
|
||||
**Docker PostgreSQL:**
|
||||
```bash
|
||||
docker run --name wishlist-postgres \
|
||||
-e POSTGRES_DB=wishlist \
|
||||
-e POSTGRES_USER=wishlistuser \
|
||||
-e POSTGRES_PASSWORD=password \
|
||||
-p 5432:5432 \
|
||||
-d postgres:16
|
||||
```
|
||||
|
||||
**Hosted:** Supabase, Neon, or Railway
|
||||
|
||||
### 2. Configure
|
||||
|
||||
```bash
|
||||
cp .env.example .env
|
||||
# Edit .env with your DATABASE_URL
|
||||
```
|
||||
|
||||
### 3. Run
|
||||
|
||||
```bash
|
||||
bun install
|
||||
bun run db:push
|
||||
bun run dev
|
||||
```
|
||||
|
||||
Visit `http://localhost:5173`
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
**Connection errors:**
|
||||
- Check PostgreSQL is running: `sudo systemctl status postgresql`
|
||||
- Test connection: `psql "postgresql://user:pass@localhost:5432/wishlist"`
|
||||
|
||||
**Port in use:**
|
||||
```bash
|
||||
bun run dev -- --port 3000
|
||||
```
|
||||
|
||||
**Schema changes:**
|
||||
```bash
|
||||
bun run db:push
|
||||
```
|
||||
Reference in New Issue
Block a user