Skip to content

Commit e315f80

Browse files
Frooodleclaude
andauthored
Move engine Dockerfiles under docker/ and fix build:engine task (#7869)
# Description of Changes - `task docker:build:engine` was broken: `dir: engine` made the build context `engine/`, but `engine/Dockerfile` uses root-relative `COPY engine/...` paths, so it failed with `"/engine/src": not found` - Root cause: #7386 switched the Dockerfile to root-relative paths and updated the CI workflows, but not `.taskfiles/docker.yml`. CI stayed green, so only local `task` users were affected - Moved `engine/Dockerfile` and `engine/Dockerfile.dev` to `docker/engine/`, so all Dockerfiles now live under `docker/` (these two were the only outliers) - Updated the 6 references in `ai-engine.yml`, `push-docker.yml`, `Saas-Dev-Deploy.yml` and `PR-Demo-Comment-with-react.yml` - Added `docker/engine/**` to the `engine` filter in `.files.yaml` so engine Dockerfile changes still trigger AI Engine CI - Added `docker:build:engine:dev`, matching the `Dockerfile.dev` build CI already runs - `build:engine` now follows the same `-f <path> .` pattern as its five sibling build tasks Dockerfile contents are unchanged (pure renames). Note: with the files under `docker/`, edits to them now also match the `project`, `frontend` and `dockerfiles` filters, so they run more CI jobs than before. ### Verified locally - `task docker:build:engine`, `task docker:build:engine:dev` - Both CI commands verbatim: `docker build --file docker/engine/Dockerfile[.dev] --tag ... .` - `task pre-commit` clean --- ## Checklist ### General - [ ] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [x] I have read the [Stirling-PDF Developer Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md) (if applicable) - [ ] I have read the [How to add new languages to Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md) (if applicable) - [x] I have performed a self-review of my own code - [x] Every comment I added says something the code does not ([guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/CODE_COMMENTS.md)) - [x] My changes generate no new warnings ### Documentation - [ ] I have updated relevant docs on [Stirling-PDF's doc repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/) (if functionality has heavily changed) - [ ] I have read the section [Add New Translation Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags) (for new translation tags only) ### Translations (if applicable) - [ ] I ran [`scripts/counter_translation.py`](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/docs/counter_translation.md) ### UI Changes (if applicable) - [ ] Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR) ### Testing (if applicable) - [ ] I have run `task check` to verify linters, typechecks, and tests pass - [x] I have tested my changes locally. Refer to the [Testing Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md#7-testing) for more details. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent 1b0941c commit e315f80

8 files changed

Lines changed: 14 additions & 8 deletions

File tree

.github/config/.files.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ tauri: &tauri
125125
engine: &engine
126126
- *ci
127127
- engine/**
128+
- docker/engine/**
128129
- app/(common|core|proprietary|saas)/src/main/java/**
129130
- .github/workflows/ai-engine.yml
130131
- Taskfile.yml

.github/workflows/PR-Demo-Comment-with-react.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ jobs:
254254
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
255255
with:
256256
context: .
257-
file: ./engine/Dockerfile
257+
file: ./docker/engine/Dockerfile
258258
push: true
259259
cache-from: type=gha,scope=stirling-pdf-engine
260260
cache-to: type=gha,mode=max,scope=stirling-pdf-engine

.github/workflows/Saas-Dev-Deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
102102
with:
103103
context: .
104-
file: ./engine/Dockerfile
104+
file: ./docker/engine/Dockerfile
105105
push: true
106106
cache-from: type=gha,scope=stirling-saas-engine
107107
cache-to: type=gha,mode=max,scope=stirling-saas-engine

.github/workflows/ai-engine.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ jobs:
100100
101101
- name: Build engine production image
102102
if: always()
103-
run: docker build --file engine/Dockerfile --tag stirling-pdf-engine:ci .
103+
run: docker build --file docker/engine/Dockerfile --tag stirling-pdf-engine:ci .
104104

105105
- name: Build engine development image
106106
if: always()
107-
run: docker build --file engine/Dockerfile.dev --tag stirling-pdf-engine-dev:ci .
107+
run: docker build --file docker/engine/Dockerfile.dev --tag stirling-pdf-engine-dev:ci .
108108

109109
- name: Remove engine check comment on success
110110
if: steps.engine-check.outcome == 'success' && github.event_name == 'pull_request'

.github/workflows/push-docker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ jobs:
405405
if: env.RUN_ENGINE == 'true'
406406
run: |
407407
set -eu
408-
hash=$( { cat engine/Dockerfile engine/pyproject.toml engine/uv.lock engine/.env; \
408+
hash=$( { cat docker/engine/Dockerfile engine/pyproject.toml engine/uv.lock engine/.env; \
409409
find engine/src -type f -print0 | sort -z | xargs -0 cat; } \
410410
| sha256sum | cut -d' ' -f1)
411411
echo "hash=${hash}" >> "$GITHUB_OUTPUT"
@@ -487,7 +487,7 @@ jobs:
487487
with:
488488
builder: ${{ steps.buildx.outputs.name }}
489489
context: .
490-
file: ./engine/Dockerfile
490+
file: ./docker/engine/Dockerfile
491491
push: true
492492
cache-from: type=gha,scope=stirling-engine
493493
cache-to: type=gha,mode=max,scope=stirling-engine

.taskfiles/docker.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ version: '3'
33
vars:
44
COMPOSE_DIR: docker/compose
55
EMBEDDED_DIR: docker/embedded
6+
ENGINE_DIR: docker/engine
67

78
tasks:
89
build:
@@ -32,9 +33,13 @@ tasks:
3233

3334
build:engine:
3435
desc: "Build engine Docker image"
35-
dir: engine
3636
cmds:
37-
- docker build -t stirling-pdf-engine .
37+
- docker build -t stirling-pdf-engine -f {{.ENGINE_DIR}}/Dockerfile .
38+
39+
build:engine:dev:
40+
desc: "Build engine development Docker image"
41+
cmds:
42+
- docker build -t stirling-pdf-engine-dev -f {{.ENGINE_DIR}}/Dockerfile.dev .
3843

3944
up:
4045
desc: "Start standard docker compose stack"

0 commit comments

Comments
 (0)