diff --git a/Makefile b/Makefile index be665e7123..801c59cc28 100644 --- a/Makefile +++ b/Makefile @@ -157,7 +157,7 @@ build-web: build-api: @echo "Building API Docker image: $(API_IMAGE):$(VERSION)..." - docker build -t $(API_IMAGE):$(VERSION) ./api + docker build -t $(API_IMAGE):$(VERSION) -f api/Dockerfile . @echo "API Docker image built successfully: $(API_IMAGE):$(VERSION)" # Push Docker images diff --git a/api/Dockerfile.dockerignore b/api/Dockerfile.dockerignore index 8ec1323c3f..1ce0ddb0ae 100644 --- a/api/Dockerfile.dockerignore +++ b/api/Dockerfile.dockerignore @@ -8,18 +8,30 @@ !dify-agent/src/ !dify-agent/src/** -api/.venv -api/.venv/** -api/.env -api/*.env.* -api/.idea -api/.mypy_cache -api/.ruff_cache -api/storage/generate_files/* -api/storage/privkeys/* -api/storage/tools/* -api/storage/upload_files/* -api/logs -api/*.log* +# Environment configuration and example +.env +*.env.* + +# Python related files **/__pycache__ **/*.pyc +**/.venv/ +**/.mypy_cache/ +**/.ruff_cache/ +**/.import_linter_cache/ +**/.pytest_cache/ +**/.hypothesis/ + + +# Upload files and logs +api/storage/** +api/logs/ +api/*.log* + +# Tests +api/tests + + +# Editor configuration +**/.vscode/ +**/.idea/