feat: Production-ready Docker infrastructure with Directus CMS
- Add separated Docker Compose architecture (astro/infrastructure/override) - Implement Directus + PostgreSQL with pinned versions (10.12.0/15.5-alpine) - Add comprehensive database safety protections and backup scripts - Configure production-ready NGINX reverse proxy setup - Add container names, labels, and enhanced healthchecks - Remove fallback environment variables for explicit production config - Include log rotation and monitoring improvements Infrastructure deployment: - npm run docker:infrastructure:up (one-time setup) - npm run docker:astro:up (regular deployments) - npm run db:backup/restore/status (database management) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -3,8 +3,13 @@ version: '3.8'
|
||||
services:
|
||||
bct-app:
|
||||
image: bct-whitelabel:latest
|
||||
container_name: bct-astro-prod
|
||||
ports:
|
||||
- "3000:3000"
|
||||
labels:
|
||||
- "com.blackcanyon.role=astro-app"
|
||||
- "com.blackcanyon.env=production"
|
||||
- "maintainer=tyler@crispygoat.com"
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- HOST=0.0.0.0
|
||||
@@ -21,7 +26,7 @@ services:
|
||||
- RESEND_API_KEY=${RESEND_API_KEY}
|
||||
# Monitoring
|
||||
- SENTRY_DSN=${SENTRY_DSN}
|
||||
- SENTRY_RELEASE=${SENTRY_RELEASE:-latest}
|
||||
- SENTRY_RELEASE=${SENTRY_RELEASE}
|
||||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
@@ -31,7 +36,7 @@ services:
|
||||
healthcheck:
|
||||
test: ["CMD", "node", "-e", "const http=require('http');const options={hostname:'localhost',port:3000,path:'/api/health',timeout:2000};const req=http.request(options,(res)=>{process.exit(res.statusCode===200?0:1)});req.on('error',()=>{process.exit(1)});req.end();"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 60s
|
||||
networks:
|
||||
@@ -51,8 +56,6 @@ services:
|
||||
cpus: '0.5'
|
||||
|
||||
networks:
|
||||
bct-network:
|
||||
driver: bridge
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 172.20.0.0/16
|
||||
default:
|
||||
external:
|
||||
name: bct-network
|
||||
Reference in New Issue
Block a user