Production & Development Setup: - Multi-stage Dockerfile with optimized build (node:20-alpine) - docker-compose.yml for production with PostgreSQL - docker-compose.dev.yml for development with hot reload - Dockerfile.dev for development environment - .dockerignore to reduce build context Features: - Health checks for both app and database - Non-root user security (nextjs:nodejs) - Resource limits (CPU/memory) - Volume persistence for logs and database - PostgreSQL 16 with automatic initialization - Network isolation with custom bridge network Helper Scripts: - docker-build.sh - Build production image - docker-start.sh - Start all services - docker-stop.sh - Stop containers safely - docker-logs.sh - View real-time logs Documentation: - DOCKER.md - Complete deployment guide with: * Quick start commands * Production deployment steps * Development hot reload setup * Configuration examples * Docker commands reference * Troubleshooting guide * Best practices for security & performance Configuration: - Environment-based configuration via .env - Safe defaults for testing ($50 positions) - Separate dev/prod compose files - Debug mode with Node.js inspector (port 9229) - Log rotation and resource monitoring Ready for deployment with: cd v4 && ./docker-start.sh
133 lines
1.3 KiB
Plaintext
133 lines
1.3 KiB
Plaintext
# Trading Bot v4 - Docker Ignore File
|
|
# Reduces build context size and prevents sensitive data from being copied
|
|
|
|
# Dependencies
|
|
node_modules
|
|
npm-debug.log*
|
|
yarn-debug.log*
|
|
yarn-error.log*
|
|
|
|
# Next.js
|
|
.next/
|
|
out/
|
|
build/
|
|
dist/
|
|
|
|
# Environment files (NEVER copy these!)
|
|
.env
|
|
.env.*
|
|
!.env.example
|
|
.env.local
|
|
.env.development
|
|
.env.test
|
|
.env.production
|
|
|
|
# Private keys and secrets
|
|
*.pem
|
|
*.key
|
|
*.p12
|
|
*.pfx
|
|
*-key.json
|
|
secrets/
|
|
credentials/
|
|
|
|
# Testing
|
|
coverage/
|
|
.nyc_output/
|
|
*.test.js
|
|
*.spec.js
|
|
__tests__/
|
|
test/
|
|
|
|
# Logs
|
|
logs/
|
|
*.log
|
|
npm-debug.log*
|
|
yarn-debug.log*
|
|
yarn-error.log*
|
|
|
|
# OS files
|
|
.DS_Store
|
|
.DS_Store?
|
|
._*
|
|
.Spotlight-V100
|
|
.Trashes
|
|
ehthumbs.db
|
|
Thumbs.db
|
|
*~
|
|
|
|
# IDE files
|
|
.vscode/
|
|
.idea/
|
|
*.swp
|
|
*.swo
|
|
*.swn
|
|
.vs/
|
|
|
|
# Git
|
|
.git/
|
|
.gitignore
|
|
.gitattributes
|
|
|
|
# Docker
|
|
Dockerfile*
|
|
docker-compose*.yml
|
|
.dockerignore
|
|
|
|
# CI/CD
|
|
.github/
|
|
.gitlab-ci.yml
|
|
.travis.yml
|
|
azure-pipelines.yml
|
|
|
|
# Documentation (optional - uncomment if you want to exclude)
|
|
# *.md
|
|
# docs/
|
|
|
|
# Development tools
|
|
.eslintrc*
|
|
.prettierrc*
|
|
.editorconfig
|
|
tsconfig.tsbuildinfo
|
|
|
|
# Database files
|
|
*.sqlite
|
|
*.sqlite3
|
|
*.db
|
|
|
|
# Prisma migrations (include if needed)
|
|
prisma/migrations/
|
|
|
|
# Screenshots and media
|
|
screenshots/
|
|
*.png
|
|
*.jpg
|
|
*.jpeg
|
|
*.gif
|
|
*.mp4
|
|
*.mov
|
|
|
|
# Temporary files
|
|
tmp/
|
|
temp/
|
|
*.tmp
|
|
|
|
# Backup files
|
|
*.bak
|
|
*.backup
|
|
*~
|
|
|
|
# Python
|
|
__pycache__/
|
|
*.py[cod]
|
|
*.pyo
|
|
*.pyd
|
|
.Python
|
|
*.so
|
|
|
|
# Large files
|
|
*.zip
|
|
*.tar
|
|
*.tar.gz
|
|
*.rar
|