Skip to content

Commit

Permalink
feat: Adding a lightweight python server that servers the html format…
Browse files Browse the repository at this point in the history
…ted OCPP logs for easier access.

Signed-off-by: Christian Weissmann <[email protected]>
  • Loading branch information
ChrisWeissmann committed Apr 30, 2024
1 parent dc6b53c commit a3bd627
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docker-compose.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ services:
platform: linux/x86_64
depends_on:
- mqtt-server
ports:
- 9000:9000
environment:
- MQTT_SERVER_ADDRESS=mqtt-server
entrypoint: "sh ./build/run-scripts/run-sil-ocpp.sh"
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.iso15118-dc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ services:
memory: "${EVEREST_MANAGER_MEMORY}"
depends_on:
- mqtt-server
ports:
- 9000:9000
environment:
- MQTT_SERVER_ADDRESS=mqtt-server
entrypoint: "sh ./build/run-scripts/run-sil-dc.sh"
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.ocpp16j.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ services:
memory: "${EVEREST_MANAGER_MEMORY}"
depends_on:
- mqtt-server
ports:
- 9000:9000
environment:
- MQTT_SERVER_ADDRESS=mqtt-server
entrypoint: "sh ./build/run-scripts/run-sil-ocpp.sh"
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.ocpp201.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ services:
memory: "${EVEREST_MANAGER_MEMORY}"
depends_on:
- mqtt-server
ports:
- 9000:9000
environment:
- MQTT_SERVER_ADDRESS=mqtt-server
entrypoint: "tail -f /dev/null"
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.two-evse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ services:
memory: "${EVEREST_MANAGER_MEMORY}"
depends_on:
- mqtt-server
ports:
- 9000:9000
environment:
- MQTT_SERVER_ADDRESS=mqtt-server
entrypoint: "sh ./build/run-scripts/run-sil-two-evse.sh"
Expand Down
8 changes: 8 additions & 0 deletions manager/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ RUN git clone https://github.com/EVerest/everest-core.git \
# Don't run the test-and-install script since it deletes the build directory!
&& /entrypoint.sh run-script install

#Add lightweight python server to serve ocpp logs formatted as html files
RUN for file in /workspace/build/run-scripts/run-sil*; do \
echo "python3 -m http.server 9000 --directory /tmp/everest_ocpp_logs &" > temp_file.sh && \
cat "$file" >> temp_file.sh && \
mv temp_file.sh "$file" && \
chmod +x "$file"; \
done

# Copy over the custom config *after* compilation and installation
COPY config-docker.json ./dist/share/everest/modules/OCPP/config-docker.json
COPY config.json ./dist/share/everest/modules/OCPP201/config.json
Expand Down

0 comments on commit a3bd627

Please sign in to comment.