Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dockerfile and update Python requirements #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM python:3

RUN apt update \
&& apt install -y default-jre-headless
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is jre installed here?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ExiCodec.jar from Josev could be the reason?


ADD . /workspace

RUN python3 -m pip install -r /workspace/requirements.txt

WORKDIR /workspace

CMD ["python3", "central_system.py", "/certs"]
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,13 @@ e.g
python3 central_system.py ~/checkout/everest-workspace/everest-core/build/dist/etc/everest/certs/
```

You can now start EVerest with an OCPP configuration that points to this CSMS. The CSMS is able to handle OCPP1.6 and OCPP2.0.1 based on the specified websocket subprotol of the client.
## Docker

Alternatively, a Docker image can be used to run the CSMS server.

```
docker build -t everest-ocpp-csms .
docker run -d --name everest-ocpp-csms -v $(pwd)/certs:/certs -p 9000:9000 everest-ocpp-csms
```

You can now start EVerest with an OCPP configuration that points to this CSMS. The CSMS is able to handle OCPP1.6 and OCPP2.0.1 based on the specified websocket subprotocol of the client.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ ocpp
cryptography
pydantic==1.*
websockets
py4j
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is py4j added here?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The py4j module is used to execute the ExiCodec.jar from Josev. I must have forgotten this module 😅