Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ RUN rm -rf /app/ha_addon
# Expose the ports your application will be listening on
EXPOSE 12345/tcp
EXPOSE 12345/udp
EXPOSE 8124/tcp
EXPOSE 52500/tcp

# Add health check that uses the same endpoint as HA addon
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD curl -f http://localhost:8124/health || exit 1
CMD curl -f http://localhost:52500/health || exit 1

# Run the SmartMeter script when the container starts
CMD ["pipenv", "run", "python", "main.py", "--loglevel", "info"]
2 changes: 1 addition & 1 deletion health_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def start_health_service(port=52500, bind_address='0.0.0.0'):
Start the global health check service.

Args:
port (int): Port to bind to (default: 8124)
port (int): Port to bind to (default: 52500)
bind_address (str): Address to bind to (default: 'localhost')

Returns:
Expand Down