From 8235d07690f23a485568af10c1619732a6af0770 Mon Sep 17 00:00:00 2001 From: hajimi Date: Sun, 2 Aug 2026 12:14:01 +0800 Subject: [PATCH] fix: build shared production images once --- docker/docker-compose.prod.yml | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/docker/docker-compose.prod.yml b/docker/docker-compose.prod.yml index 90f5fe4..87e9e8a 100644 --- a/docker/docker-compose.prod.yml +++ b/docker/docker-compose.prod.yml @@ -8,9 +8,6 @@ x-logging: &default-logging x-php-service: &php-service image: sport-era-prod-php:local - build: - context: .. - dockerfile: docker/Dockerfile.php restart: unless-stopped network_mode: host working_dir: /likeadmin_php/server @@ -25,9 +22,6 @@ x-php-service: &php-service x-crawler-service: &crawler-service image: sport-era-prod-crawler:local - build: - context: ${CRAWLER_DIR:-./crawler} - dockerfile: Dockerfile restart: unless-stopped network_mode: host env_file: @@ -47,6 +41,9 @@ x-crawler-service: &crawler-service services: server: <<: *php-service + build: + context: .. + dockerfile: docker/Dockerfile.php healthcheck: test: - CMD-SHELL @@ -60,9 +57,6 @@ services: scheduler: <<: *php-service - # Reuse the server PHP image; building the same tag concurrently causes - # BuildKit export collisions during a full production bootstrap. - build: null command: - sh - -c @@ -70,11 +64,12 @@ services: crawler: <<: *crawler-service + build: + context: ${CRAWLER_DIR:-./crawler} + dockerfile: Dockerfile kb-worker: <<: *crawler-service - # Reuse the crawler image built by the crawler service. - build: null command: - python - scripts/kb_worker.py