Add complete infrastructure automation and documentation
Some checks failed
Deploy to Production / Deploy to Server (push) Has been cancelled
Some checks failed
Deploy to Production / Deploy to Server (push) Has been cancelled
- infrastructure/setup.sh: Master provisioning script for fresh Ubuntu servers - infrastructure/docker-compose.yml: Production Docker Compose configuration - infrastructure/.env.template: Environment variables template - infrastructure/nginx/: Nginx configuration with security headers - infrastructure/postfix/: Postfix + OpenDKIM email configuration - infrastructure/README.md: Complete disaster recovery guide - scripts/docfast-backup.sh: SQLite backup script with rotation All services now fully reproducible with documented disaster recovery procedures.
This commit is contained in:
parent
d99eea517c
commit
3820d7ea4d
9 changed files with 766 additions and 0 deletions
41
infrastructure/docker-compose.yml
Normal file
41
infrastructure/docker-compose.yml
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
version: "3.8"
|
||||
services:
|
||||
docfast:
|
||||
build: .
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "127.0.0.1:3100:3100"
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
environment:
|
||||
- API_KEYS=${API_KEYS}
|
||||
- PORT=3100
|
||||
- NODE_ENV=production
|
||||
- STRIPE_SECRET_KEY=${STRIPE_SECRET_KEY}
|
||||
- STRIPE_WEBHOOK_SECRET=${STRIPE_WEBHOOK_SECRET}
|
||||
- BASE_URL=${BASE_URL:-https://docfast.dev}
|
||||
- PRO_KEYS=${PRO_KEYS}
|
||||
- SMTP_HOST=host.docker.internal
|
||||
- SMTP_PORT=25
|
||||
- DATABASE_HOST=172.17.0.1
|
||||
- DATABASE_PORT=5432
|
||||
- DATABASE_NAME=docfast
|
||||
- DATABASE_USER=docfast
|
||||
- DATABASE_PASSWORD=${DATABASE_PASSWORD:-docfast}
|
||||
- POOL_SIZE=15
|
||||
- BROWSER_COUNT=1
|
||||
- PAGES_PER_BROWSER=15
|
||||
volumes:
|
||||
- docfast-data:/app/data
|
||||
mem_limit: 2560m
|
||||
cpus: 1.5
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:3100/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
|
||||
volumes:
|
||||
docfast-data:
|
||||
driver: local
|
||||
Loading…
Add table
Add a link
Reference in a new issue