feat: Add staging environment for local production testing
- Add docker-compose.staging.yml with PostgreSQL and Django - Add .env.staging.example with staging-specific environment variables - Configure staging settings (DEBUG=False, no SSL redirect for localhost) - Update settings/__init__.py to support staging environment detection - Update AGENTS.md with staging environment documentation - Update .gitignore to exclude .env.staging - Optimize docker-compose.prod.yml configuration Staging environment simulates production configuration locally: - PostgreSQL database (port 5433 to avoid conflicts) - Gunicorn with 4 workers - DEBUG=False but HTTP allowed for easier testing - Separate volumes for static files, media, and logs Usage: cp .env.staging.example .env.staging docker compose -f docker-compose.staging.yml up -d
This commit is contained in:
@@ -18,7 +18,11 @@ services:
|
||||
- tienda_network
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-tienda_ilusion_user}"]
|
||||
test:
|
||||
[
|
||||
"CMD-SHELL",
|
||||
"pg_isready -U ${POSTGRES_USER:-tienda_ilusion_user} -d ${POSTGRES_DB:-tienda_ilusion_prod}",
|
||||
]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
Reference in New Issue
Block a user