heroyooki / EVerythingcharge

OCPP management system for the charge points operators (CPO's), on Python/FastAPI/Vue3. Supports 1.6 and 2.0.1 OCPP versions.
28 stars 11 forks source link

Trouble setting up following README instructions #4

Open EasonChen11 opened 3 weeks ago

EasonChen11 commented 3 weeks ago

Hello,

I am a student currently learning about OCPPv2.0.1 and found your project on GitHub under the MicroOcpp repository. I am very interested in the content you provided and am trying to set up a server based on your README.md instructions.

However, I've encountered some issues and need some guidance. Here are my specific questions and the steps I have taken so far:

Initial Setup: I followed the README.md instructions to clone the repository and install dependencies. Can you confirm if there are any specific versions of tools or software (e.g. Python) that I should be using?

Docker Setup:

I am relatively new to Docker. Could you provide some detailed steps on how to set up Docker for this project? Are there any specific Docker images or containers that I should use? Configuration Files:

Are there any configuration files that I need to modify before running the server? If so, could you provide some examples or templates? Common Errors: Are there common setup errors that I should be aware of, and do you have any troubleshooting tips?

I would greatly appreciate any help or resources you could provide to assist me in setting up the server correctly.

Thank you for your time and assistance.

Best regards, EasonChen11

EasonChen11 commented 2 weeks ago

This is my log:

$./run.sh -s api -s worker
Start ensure backend env with 'ALLOWED_ORIGIN'.
'alue for environment variable ALLOWED_ORIGIN is already set as 'http://localhost
Are you sure you want to keep the current value? (y/n): y
Keeping the current value: http://localhost
\n >>> Build and run 'api' and 'worker' services ... \n
WARN[0000] /mnt/d/CCUNetTopics/EVerythingcharge/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion
invalid hostPort: 5672
Error: No such object: everythingcharge-rabbitmq
./run.sh: line 81: jq: command not found
[+] Building 214.3s (14/14) FINISHED                                                                                              docker:default
 => [internal] load build definition from Dockerfile                                                                                        0.0s
 => => transferring dockerfile: 431B                                                                                                        0.0s 
 => [internal] load metadata for docker.io/library/python:3.11.3-slim-bullseye                                                              1.5s 
 => [auth] library/python:pull token for registry-1.docker.io                                                                               0.0s 
 => [internal] load .dockerignore                                                                                                           0.0s
 => => transferring context: 2B                                                                                                             0.0s 
 => [1/8] FROM docker.io/library/python:3.11.3-slim-bullseye@sha256:eaee5f73efa9ae962d2077756292bc4878c04fcbc13dc168bb00cc365f35647e        0.0s 
 => [internal] load build context                                                                                                         173.7s
 => => transferring context: 1.81MB                                                                                                       173.7s 
 => CACHED [2/8] RUN apt-get update                                                                                                         0.0s 
 => CACHED [3/8] RUN mkdir -p /ocpp/backend                                                                                                 0.0s 
 => CACHED [4/8] RUN mkdir -p /ocpp/frontend                                                                                                0.0s 
 => CACHED [5/8] WORKDIR /ocpp/backend                                                                                                      0.0s 
 => [6/8] COPY backend /ocpp/backend                                                                                                        0.1s 
 => [7/8] COPY frontend /ocpp/frontend                                                                                                      8.7s 
 => [8/8] RUN pip install -r requirements.txt --upgrade pip                                                                                28.2s 
 => exporting to image                                                                                                                      2.0s 
 => => exporting layers                                                                                                                     2.0s     
 => => writing image sha256:339964830d6f8978e1d1af18a0bced28114164a3be1022b001ebef3138db614e                                                0.0s     
 => => naming to docker.io/library/everythingcharge-worker                                                                                  0.0s     
.ocker: Invalid containerPort: 3000
See 'docker run --help'.
\n >>> Connecting worker to the queue on the '' host ... \n
Error response from daemon: No such container: EVworker
Error response from daemon: No such container: EVapi

and my everythingcharge-db log

2024-08-27 03:14:29 initdb: error: could not change permissions of directory "/var/lib/postgres": Operation not permitted
2024-08-27 03:15:29 chmod: changing permissions of '/var/lib/postgres': Operation not permitted
alexroat commented 1 week ago

Hello, I'm trying this project too...

Some tip to run:

install docker or docker desktop.

clone the project git clone https://github.com/heroyooki/EVerythingcharge.git

cd into the project root cd EVerythingcharge

copy or rename the sample .env.backend to .env file cp .env.backend .env

start the docker compose directly

docker compose up --build

Note: in case you have already tried to run unsuccessfully before, remove the db_data folder rm -rf db_data

Note: in case you've an already running http server using port 80 nginx wont start... it is sufficient to change the mapping in the docker-compose.yml to a free port, e.g 8099.:

everythingcharge-nginx:
    image: nginx:1.24.0-bullseye
    ports:
      - "8099:80"
    volumes:
      - ./nginx:/etc/nginx/conf.d
    depends_on:
      - everythingcharge-frontend
    networks:
      - app-network

you can open the browser to http://localhost:8099 and see the login page:

image