Skip to content

Commit 35d7eef

Browse files
Merge pull request #694 from yasinBursali/fix/ape-binding-and-port
fix: bind APE uvicorn to 0.0.0.0 and decouple internal port from APE_PORT
2 parents a30547a + cfc2691 commit 35d7eef

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

dream-server/extensions/services/ape/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RUN adduser --system --no-create-home ape
1212
EXPOSE 7890
1313

1414
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
15-
CMD python3 -c "import urllib.request; urllib.request.urlopen('http://localhost:7890/health')" || exit 1
15+
CMD python3 -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:7890/health')" || exit 1
1616

1717
USER ape
1818

dream-server/extensions/services/ape/compose.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ services:
88
security_opt:
99
- no-new-privileges:true
1010
environment:
11-
- APE_PORT=${APE_PORT:-7890}
1211
- APE_POLICY_FILE=/config/policy.yaml
1312
- APE_AUDIT_LOG=/data/ape/audit.jsonl
1413
- APE_RATE_LIMIT_RPM=${APE_RATE_LIMIT_RPM:-60}
@@ -28,7 +27,7 @@ services:
2827
cpus: '0.1'
2928
memory: 64M
3029
healthcheck:
31-
test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:7890/health')"]
30+
test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:7890/health')"]
3231
interval: 30s
3332
timeout: 5s
3433
retries: 3

dream-server/extensions/services/ape/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,4 +377,4 @@ async def metrics(api_key: str = Depends(verify_api_key)):
377377
if __name__ == "__main__":
378378
import uvicorn
379379
port = int(os.environ.get("APE_PORT", "7890"))
380-
uvicorn.run(app, host="127.0.0.1", port=port)
380+
uvicorn.run(app, host="0.0.0.0", port=port)

0 commit comments

Comments
 (0)