Fix Docker build for harness workspace dependency on @homelab/db
Some checks failed
CI / lint-and-test (push) Successful in 29s
CI / build (push) Has been cancelled
Deploy Production / deploy (push) Has been cancelled

Switch harness Dockerfile to pnpm with repo root build context so
workspace:^ dependency on @homelab/db resolves. Use .dockercontext
marker file to opt individual apps into root context builds while
keeping web/api on their local app context.
This commit is contained in:
Julia McGhee
2026-03-21 20:24:02 +00:00
parent 3fe75a8e04
commit f0d9482bc8
5 changed files with 37 additions and 12 deletions

View File

@@ -46,10 +46,16 @@ jobs:
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login gitea.coreworlds.io -u lazorgurl --password-stdin
IFS=',' read -ra APPS <<< "${{ steps.changes.outputs.apps }}"
for app in "${APPS[@]}"; do
if [ -f "apps/${app}/.dockercontext" ]; then
CONTEXT="."
else
CONTEXT="apps/${app}"
fi
docker build \
-t gitea.coreworlds.io/lazorgurl/homelab-${app}:${{ gitea.sha }} \
-t gitea.coreworlds.io/lazorgurl/homelab-${app}:latest \
apps/${app}
-f apps/${app}/Dockerfile \
$CONTEXT
docker push gitea.coreworlds.io/lazorgurl/homelab-${app}:${{ gitea.sha }}
docker push gitea.coreworlds.io/lazorgurl/homelab-${app}:latest
done