fix(deployment): add image references to docker-compose.production.yml
Production deployment was failing because docker-compose.production.yml had build: sections but no image: references. This caused Docker Compose to attempt building on the server, which failed because the docker/ directory doesn't exist in the deployment location. Changes: - Add image: git.michaelschiemer.de:5000/framework:latest to web, php, and queue-worker services - Removed build: section from php service (no longer needed) - Remove test comment from ShowHome.php The deployment script's sed command (line 1259-1260 in build-image.yml) now successfully finds and updates the image: tags with the correct version from the registry. Related to: Production deployment error "docker/php: no such file or directory"
This commit is contained in:
@@ -12,6 +12,9 @@
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
web:
|
web:
|
||||||
|
# Use pre-built image from registry
|
||||||
|
image: git.michaelschiemer.de:5000/framework:latest
|
||||||
|
|
||||||
# Production restart policy
|
# Production restart policy
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
@@ -75,6 +78,9 @@ services:
|
|||||||
condition: service_started
|
condition: service_started
|
||||||
|
|
||||||
php:
|
php:
|
||||||
|
# Use pre-built image from registry
|
||||||
|
image: git.michaelschiemer.de:5000/framework:latest
|
||||||
|
|
||||||
# Production restart policy
|
# Production restart policy
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
@@ -91,12 +97,6 @@ services:
|
|||||||
- CHOWN
|
- CHOWN
|
||||||
- DAC_OVERRIDE
|
- DAC_OVERRIDE
|
||||||
|
|
||||||
# Override build args for production
|
|
||||||
build:
|
|
||||||
args:
|
|
||||||
- ENV=production
|
|
||||||
- COMPOSER_INSTALL_FLAGS=--no-dev --optimize-autoloader --classmap-authoritative
|
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
- APP_ENV=production
|
- APP_ENV=production
|
||||||
- APP_DEBUG=false
|
- APP_DEBUG=false
|
||||||
@@ -227,7 +227,8 @@ services:
|
|||||||
labels: "service,environment"
|
labels: "service,environment"
|
||||||
|
|
||||||
queue-worker:
|
queue-worker:
|
||||||
# Use same build as php service (has application code copied)
|
# Use pre-built image from registry
|
||||||
|
image: git.michaelschiemer.de:5000/framework:latest
|
||||||
|
|
||||||
# Production restart policy
|
# Production restart policy
|
||||||
restart: always
|
restart: always
|
||||||
|
|||||||
@@ -47,4 +47,3 @@ final readonly class ShowHome
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Production deployment test trigger
|
|
||||||
|
|||||||
Reference in New Issue
Block a user