Intial Version

This commit is contained in:
2025-12-03 18:00:10 -05:00
parent 43c4227da7
commit 0b86c88eb4
55 changed files with 8938 additions and 0 deletions

50
docker-compose.yml Normal file
View File

@@ -0,0 +1,50 @@
version: '3.8'
services:
postgres:
image: postgres:16-alpine
container_name: rmtpw-postgres
restart: unless-stopped
environment:
POSTGRES_USER: rmtpw
POSTGRES_PASSWORD: rmtpw_password
POSTGRES_DB: rmtpocketwatcher
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U rmtpw -d rmtpocketwatcher"]
interval: 10s
timeout: 5s
retries: 5
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: rmtpw-backend
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
environment:
DATABASE_URL: postgresql://rmtpw:rmtpw_password@postgres:5432/rmtpocketwatcher?schema=public
PORT: 3000
HOST: 0.0.0.0
NODE_ENV: production
SCRAPE_INTERVAL_MINUTES: 5
SCRAPER_HEADLESS: "true"
SCRAPER_TIMEOUT: 30000
SCRAPER_MAX_RETRIES: 3
ports:
- "3000:3000"
volumes:
- ./backend:/app
- /app/node_modules
- /app/dist
command: sh -c "npm run db:push && npm start"
volumes:
postgres_data:
driver: local