Files
wishlist/DOCKER.md
2025-11-25 16:08:50 +01:00

876 B

Docker Guide

Docker Compose

# Start services
docker-compose up -d

# Setup database
docker-compose exec app bun run db:push

# View logs
docker-compose logs -f app

# Stop services
docker-compose down

Visit http://localhost:3000

Docker Build

# Build image
docker build -t wishlist-app .

# Run container
docker run -d \
  -p 3000:3000 \
  -e DATABASE_URL="postgresql://user:pass@host:5432/db" \
  --name wishlist-app \
  wishlist-app

Environment Variables

Required:

  • DATABASE_URL - PostgreSQL connection string
  • NODE_ENV - Set to production
  • PORT - Default 3000

Database Setup

# docker-compose
docker-compose exec app bun run db:push

# Standalone container
docker exec -it wishlist-app bun run db:push

Migrations

Production migrations:

docker exec -it wishlist-app bun run db:migrate