chore: remove retundant .env files. some additional fixes
This commit is contained in:
@@ -66,6 +66,11 @@ services:
|
||||
certbot:
|
||||
condition: service_started
|
||||
|
||||
# Networks must be explicitly defined to avoid override issues
|
||||
networks:
|
||||
- frontend
|
||||
- backend
|
||||
|
||||
php:
|
||||
# Production restart policy
|
||||
restart: always
|
||||
@@ -124,6 +129,11 @@ services:
|
||||
# Mount .env file from shared directory (production environment variables)
|
||||
- /home/deploy/michaelschiemer/shared/.env.production:/var/www/html/.env:ro
|
||||
|
||||
# Networks must be explicitly defined to avoid override issues
|
||||
networks:
|
||||
- backend
|
||||
- cache
|
||||
|
||||
db:
|
||||
# Production restart policy
|
||||
restart: always
|
||||
@@ -161,6 +171,10 @@ services:
|
||||
compress: "true"
|
||||
labels: "service,environment"
|
||||
|
||||
# Networks must be explicitly defined to avoid override issues
|
||||
networks:
|
||||
- backend
|
||||
|
||||
redis:
|
||||
# Production restart policy
|
||||
restart: always
|
||||
@@ -192,6 +206,10 @@ services:
|
||||
compress: "true"
|
||||
labels: "service,environment"
|
||||
|
||||
# Networks must be explicitly defined to avoid override issues
|
||||
networks:
|
||||
- cache
|
||||
|
||||
queue-worker:
|
||||
# Use same image as php service (has application code copied)
|
||||
image: framework-production-php
|
||||
@@ -203,10 +221,8 @@ services:
|
||||
# The entrypoint script will use gosu to switch to appuser after setup
|
||||
user: "root"
|
||||
|
||||
# Override entrypoint - use php image's entrypoint for proper setup
|
||||
entrypoint: ["/usr/local/bin/docker-entrypoint.sh"]
|
||||
|
||||
# Worker command - executed after entrypoint setup
|
||||
# No entrypoint override - queue-worker runs worker.php directly
|
||||
# Worker command - direct PHP execution
|
||||
command: ["php", "/var/www/html/worker.php"]
|
||||
|
||||
# Production volumes
|
||||
@@ -215,6 +231,8 @@ services:
|
||||
- /home/deploy/michaelschiemer/current:/var/www/html:ro
|
||||
# Mount storage directory as writable volume (overlays the read-only code mount)
|
||||
- storage:/var/www/html/storage:rw
|
||||
# Mount var directory as writable volume for cache and logs (overlays read-only code mount)
|
||||
- var-data:/var/www/html/var:rw
|
||||
# Mount .env file from shared directory (production environment variables)
|
||||
- /home/deploy/michaelschiemer/shared/.env.production:/var/www/html/.env:ro
|
||||
|
||||
@@ -248,6 +266,20 @@ services:
|
||||
# Graceful shutdown for long-running jobs
|
||||
stop_grace_period: 60s
|
||||
|
||||
# Wait for dependencies to be healthy before starting
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
php:
|
||||
condition: service_healthy
|
||||
|
||||
# Networks must be explicitly defined to avoid override issues
|
||||
networks:
|
||||
- backend
|
||||
- cache
|
||||
|
||||
# Certbot Sidecar Container for Let's Encrypt
|
||||
certbot:
|
||||
image: certbot/certbot:latest
|
||||
@@ -282,7 +314,7 @@ networks:
|
||||
driver: bridge
|
||||
backend:
|
||||
driver: bridge
|
||||
internal: true # Backend network is internal (no internet access)
|
||||
# NOTE: backend must NOT be internal - PHP needs to communicate with DB!
|
||||
cache:
|
||||
driver: bridge
|
||||
internal: true # Cache network is internal
|
||||
|
||||
Reference in New Issue
Block a user