Files
rmtPocketWatcher/docker-compose.yml
HRiggs 9ad236c31d
Some checks failed
Deploy Backend to Docker / deploy-portainer (push) Has been cancelled
Deploy Backend to Docker / deploy (push) Has been cancelled
ports
2025-12-03 21:13:55 -05:00

51 lines
1.2 KiB
YAML

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:
- "5441: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:
- "3043:3000"
volumes:
- ./backend:/app
- /app/node_modules
- /app/dist
command: sh -c "npm run db:push && npm start"
volumes:
postgres_data:
driver: local