docs: fix stale Docker paths and park region counts
Build and Deploy / Build & Push (push) Successful in 1m10s
Build and Deploy / Build & Push (push) Successful in 1m10s
Update /app/data → /app/backend/data across all docs to match the
volume mount fix from 3c91d9a. Add missing TZ env var to the web
container snippet in OPERATIONS.md. Correct Midwest (6→7) and
West & International (6→5) park counts in ARCHITECTURE.md.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -283,7 +283,7 @@ CREATE TABLE IF NOT EXISTS park_days (
|
||||
|
||||
### Storage
|
||||
|
||||
- **Location**: `backend/data/parks.db` (or `/app/data/parks.db` in Docker)
|
||||
- **Location**: `backend/data/parks.db` (or `/app/backend/data/parks.db` in Docker)
|
||||
- **WAL journal files**: `parks.db-wal` and `parks.db-shm` accompany the main database
|
||||
- **Size**: Approximately 8,000-9,000 rows for a full year of 24 parks
|
||||
- **Not committed to git**: Listed in `.gitignore`
|
||||
@@ -466,9 +466,9 @@ interface Park {
|
||||
**Regions:**
|
||||
- Northeast (6 parks): Great Adventure, New England, Great Escape, Darien Lake, Dorney Park, Canada's Wonderland
|
||||
- Southeast (3 parks): Over Georgia, Carowinds, Kings Dominion
|
||||
- Midwest (6 parks): Great America (IL), St. Louis, Cedar Point, Kings Island, Valleyfair, Worlds of Fun, Michigan's Adventure
|
||||
- Midwest (7 parks): Great America (IL), St. Louis, Cedar Point, Kings Island, Valleyfair, Worlds of Fun, Michigan's Adventure
|
||||
- Texas & South (3 parks): Over Texas, Fiesta Texas, Frontier City
|
||||
- West & International (6 parks): Magic Mountain, Discovery Kingdom, Knott's Berry Farm, California's Great America, Mexico
|
||||
- West & International (5 parks): Magic Mountain, Discovery Kingdom, Knott's Berry Farm, California's Great America, Mexico
|
||||
|
||||
**Lookup utilities:**
|
||||
- `PARK_MAP`: `Map<string, Park>` for O(1) lookup by `id`
|
||||
|
||||
+1
-1
@@ -256,7 +256,7 @@ docker build --target backend -t sixflagssupercalendar:backend .
|
||||
docker compose up -d
|
||||
|
||||
# Or run individual containers
|
||||
docker run -d -p 3001:3001 -v park_data:/app/data -e TZ=America/New_York sixflagssupercalendar:backend
|
||||
docker run -d -p 3001:3001 -v park_data:/app/backend/data -e TZ=America/New_York sixflagssupercalendar:backend
|
||||
docker run -d -p 3000:3000 -e BACKEND_URL=http://host.docker.internal:3001 sixflagssupercalendar:web
|
||||
```
|
||||
|
||||
|
||||
+8
-7
@@ -75,6 +75,7 @@ services:
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- BACKEND_URL=http://backend:3001 # Docker internal networking
|
||||
- TZ=America/New_York
|
||||
restart: unless-stopped
|
||||
|
||||
backend:
|
||||
@@ -82,7 +83,7 @@ services:
|
||||
ports:
|
||||
- "3001:3001"
|
||||
volumes:
|
||||
- park_data:/app/data # SQLite database persistence
|
||||
- park_data:/app/backend/data # SQLite database persistence
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- TZ=America/New_York # Timezone for cron schedules
|
||||
@@ -211,22 +212,22 @@ docker compose pull && docker compose up -d
|
||||
|
||||
### What to Back Up
|
||||
|
||||
The SQLite database at `/app/data/parks.db` inside the `park_data` Docker volume. WAL journal files (`parks.db-wal` and `parks.db-shm`) must be included for a consistent backup.
|
||||
The SQLite database at `/app/backend/data/parks.db` inside the `park_data` Docker volume. WAL journal files (`parks.db-wal` and `parks.db-shm`) must be included for a consistent backup.
|
||||
|
||||
### Backup Methods
|
||||
|
||||
**Method 1: Copy from the container**
|
||||
```bash
|
||||
docker compose cp backend:/app/data/parks.db ./backup/parks.db
|
||||
docker compose cp backend:/app/data/parks.db-wal ./backup/parks.db-wal 2>/dev/null
|
||||
docker compose cp backend:/app/data/parks.db-shm ./backup/parks.db-shm 2>/dev/null
|
||||
docker compose cp backend:/app/backend/data/parks.db ./backup/parks.db
|
||||
docker compose cp backend:/app/backend/data/parks.db-wal ./backup/parks.db-wal 2>/dev/null
|
||||
docker compose cp backend:/app/backend/data/parks.db-shm ./backup/parks.db-shm 2>/dev/null
|
||||
```
|
||||
|
||||
**Method 2: Mount the volume to the host**
|
||||
Add a bind mount in `docker-compose.yml`:
|
||||
```yaml
|
||||
volumes:
|
||||
- ./data:/app/data
|
||||
- ./data:/app/backend/data
|
||||
```
|
||||
|
||||
### Restore
|
||||
@@ -442,7 +443,7 @@ If the database becomes corrupted (unlikely with SQLite WAL mode, but possible a
|
||||
1. Stop the backend: `docker compose stop backend`
|
||||
2. Delete the database files from the volume:
|
||||
```bash
|
||||
docker compose run --rm backend rm -f /app/data/parks.db /app/data/parks.db-wal /app/data/parks.db-shm
|
||||
docker compose run --rm backend rm -f /app/backend/data/parks.db /app/backend/data/parks.db-wal /app/backend/data/parks.db-shm
|
||||
```
|
||||
3. Restart: `docker compose start backend` (auto-creates empty database)
|
||||
4. Re-scrape: `curl -X POST http://localhost:3001/api/scrape/trigger?scope=full`
|
||||
|
||||
Reference in New Issue
Block a user