Skip to content

Commit c422c5c

Browse files
committed
Bind health server to localhost
1 parent c2c388e commit c422c5c

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

backend/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ RUN cargo build --release --bin backend
2525

2626
# Expose WebSocket port
2727
EXPOSE 8443
28-
EXPOSE 443
28+
EXPOSE 7000
2929

3030
# Set entrypoint with default server address for container
3131
ENTRYPOINT ["cargo", "run", "--release", "--bin", "backend", "--"]
32-
CMD ["--server-addr", "0.0.0.0:8443", "--health-server-addr", "0.0.0.0:443"]
32+
CMD ["--server-addr", "0.0.0.0:8443", "--health-server-addr", "127.0.0.1:7000"]

backend/Dockerfile_build_and_publish

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ COPY --from=builder /usr/src/app/restricted_filters.json /app/restricted_filters
4646

4747
# Expose WebSocket port
4848
EXPOSE 8443
49-
EXPOSE 443
49+
EXPOSE 7000
5050

5151
# Set entrypoint using absolute path or relative to WORKDIR
5252
ENTRYPOINT ["./backend"]
53-
CMD ["--server-addr", "0.0.0.0:8443", "--health-server-addr", "0.0.0.0:443"]
53+
CMD ["--server-addr", "0.0.0.0:8443", "--health-server-addr", "127.0.0.1:7000"]

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ services:
1616
# Optional: Persistent logs volume
1717
- logs:/var/log/eventwatch
1818
restart: unless-stopped
19-
command: ["--server-addr", "0.0.0.0:8443", "--health-server-addr", "0.0.0.0:443"]
19+
command: ["--server-addr", "0.0.0.0:8443", "--health-server-addr", "127.0.0.1:7000"]
2020
healthcheck:
21-
test: ["CMD-SHELL", "curl -sf http://0.0.0.0:443/health | grep -q '\"success\": true'"]
21+
test: ["CMD-SHELL", "curl -sf http://127.0.0.1:7000/health | grep -q '\"success\": true'"]
2222
interval: 10s
2323
timeout: 5s
2424
retries: 3

0 commit comments

Comments
 (0)