Refactor Dockerfile and compose.yml for slim-build improvements and remove unused database services.

This commit is contained in:
grillazz
2026-06-05 19:33:55 +02:00
parent 1a26bc4af2
commit 42d0f20475
3 changed files with 58 additions and 53 deletions
+6 -1
View File
@@ -66,12 +66,17 @@ py-upgrade: ## Upgrade Python syntax to a newer version
lint: ## Lint and format project code
uv run ruff check --fix .
# ====================================================================================
# DOCKER IMAGE BUILDING
# ====================================================================================
.PHONY: slim-build
slim-build: ## Build smaller and more secure Docker images with docker-slim
docker-slim build --compose-file docker-compose.yml --target-compose-svc api1 --dep-include-target-compose-svc-deps true --http-probe-exec api1 fastapi-sqlalchemy-asyncpg_api1:latest
docker-slim build --compose-file compose.yml \
--target-compose-svc api1 \
--dep-include-target-compose-svc-deps true \
--http-probe-exec api1 fastapi-sqlalchemy-asyncpg-api1:latest \
--include-path /panettone/lib/python3.14
# ====================================================================================
# DATABASE SEEDING