refactor: migrate to monorepo structure with Docker, PocketBase, and e2e tests
- Reorganize into apps/, packages/, docs/, e2e/, pocketbase/ directories - Add Dockerfiles for web, worker, and PocketBase services - Add docker-compose.yml for local orchestration - Add turbo.json for monorepo task management - Add Playwright e2e test infrastructure - Add PocketBase backend with migrations - Remove Vite/Next.js/ESLint/PostCSS config files - Update package.json with workspace dependencies - Add .env.example and .dockerignore
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
services:
|
||||
web:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.web
|
||||
container_name: project-e-web
|
||||
# For Nginx Proxy Manager: Don't expose ports directly
|
||||
# NPM will connect via Docker network using container name
|
||||
# Only uncomment ports if you need direct access for debugging
|
||||
# ports:
|
||||
# - "3000:3000"
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- POCKETBASE_URL=http://db:8090
|
||||
- POCKETBASE_ADMIN_TOKEN=${POCKETBASE_ADMIN_TOKEN:-}
|
||||
- PUBLIC_URL=${PUBLIC_URL:-http://localhost:3000}
|
||||
- COOKIE_SECURE=${COOKIE_SECURE:-false}
|
||||
- ALLOWED_HOSTS=${ALLOWED_HOSTS:-localhost}
|
||||
volumes:
|
||||
- project-e-web-uploads:/tmp/uploads
|
||||
networks:
|
||||
- project-e-network
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/api/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
restart: unless-stopped
|
||||
|
||||
db:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.pocketbase
|
||||
container_name: project-e-db
|
||||
# For Nginx Proxy Manager: Don't expose ports directly
|
||||
# Only uncomment if you need direct PocketBase admin access
|
||||
# ports:
|
||||
# - "8090:8090"
|
||||
volumes:
|
||||
- project-e-pb-data:/pb_data
|
||||
networks:
|
||||
- project-e-network
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8090/api/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
restart: unless-stopped
|
||||
|
||||
worker:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.worker
|
||||
container_name: project-e-worker
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- POCKETBASE_URL=http://db:8090
|
||||
- POCKETBASE_ADMIN_TOKEN=${POCKETBASE_ADMIN_TOKEN:-}
|
||||
networks:
|
||||
- project-e-network
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
|
||||
networks:
|
||||
project-e-network:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
project-e-pb-data:
|
||||
project-e-web-uploads:
|
||||
Reference in New Issue
Block a user