Giter VIP home page Giter VIP logo

Comments (16)

razvanilin avatar razvanilin commented on June 14, 2024

Hey @serve-saeidpour the environment variables are not entirely correct. The latest version doesn't use the REACT_APP_* variables and have been replaced by VITE_APP_*

Take a look at the README example here: https://github.com/chartbrew/chartbrew?tab=readme-ov-file#quickstart

from chartbrew.

razvanilin avatar razvanilin commented on June 14, 2024

Also, don't forget to restart the container after you make changes to the variables. A restart will trigger the UI to be rebuilt with the correct variables

from chartbrew.

serve-saeidpour avatar serve-saeidpour commented on June 14, 2024

thnks for your guide, now i update the environment variables(docker run --name chartbrew -p 4019:4019 -p 4018:4018 -e CB_SECRET=**** -e CB_API_HOST=0.0.0.0 -e CB_API_PORT=4019 -e CB_DB_DIALECT=postgres -e CB_DB_HOST=host.docker.internal -e CB_DB_PORT=5432 -e CB_DB_NAME=postgres -e CB_DB_USERNAME=postgres -e CB_DB_PASSWORD=**** -e VITE_APP_CLIENT_HOST=http://localhost:4018 -e VITE_APP_CLIENT_PORT=4018 -e VITE_APP_API_HOST=http://localhost:4019 razvanilin/chartbrew) but again i cant sign up and sign in ! i test 1 month ago and i I made a chart with this container!

from chartbrew.

razvanilin avatar razvanilin commented on June 14, 2024

You can use the DevTools in the browser and check the Network tab to see where the signup/signin requests are going. Usually the errors are caused by the VITE_APP_CLIENT_HOST and VITE_APP_API_HOST not being set properly.

For example, the Signup request should be a POST request to http://localhost:4019/user. If it's anything different, it means the variable was not refreshed properly and you might have to either restart the container or run the build command manually like this:

https://docs.chartbrew.com/deployment/#changing-environmental-variables

from chartbrew.

serve-saeidpour avatar serve-saeidpour commented on June 14, 2024

yes i getting this error: POST http://localhost:4019/user/login net::ERR_EMPTY_RESPONSE index-TFhWg_gs.js:168

from chartbrew.

serve-saeidpour avatar serve-saeidpour commented on June 14, 2024

hi, my problem dont be solve! iuse this containers:
docker run --name chartbrew -p 4019:4019 -p 4018:4018 -e CB_SECRET=**** -e CB_API_HOST=0.0.0.0 -e CB_API_PORT=4019 -e CB_DB_HOST=host.docker.internal -e CB_DB_PORT=5432 -e CB_DB_NAME=wapp -e CB_DB_USERNAME=**** -e CB_DB_PASSWORD=**** -e VITE_APP_CLIENT_HOST=http://localhost:4018/ -e VITE_APP_CLIENT_PORT=4018 -e VITE_APP_API_HOST=http://localhost:4019/ razvanilin/chartbrew

docker run --name some-postgres -e POSTGRES_PASSWORD=**** -d -p 5432:5432 postgres:16
and i cant sign up in chartbrew! i get this error:Failed to load resource: net::ERR_EMPTY_RESPONSE :4019/user/relog:1

from chartbrew.

razvanilin avatar razvanilin commented on June 14, 2024

Could you inspect your database you are connecting to and see if the tables and if any data is added to it? I cannot see any issues with the docker command unless there are some issues with the database

from chartbrew.

serve-saeidpour avatar serve-saeidpour commented on June 14, 2024

hi
I'm unable to sign in to Chartbrew, which is crucial for my project's dashboard and graph creation and i got same error. Can you assist me in resolving this issue?

from chartbrew.

serve-saeidpour avatar serve-saeidpour commented on June 14, 2024

i have database(postgres) and saved data in this, but i cant sign in chartbrew for showing data on dashboard.

from chartbrew.

serve-saeidpour avatar serve-saeidpour commented on June 14, 2024

The error I receive is related to the server not responding on port 4019., Failed to load resource: net::ERR_EMPTY_RESPONSE :4019/user/relog:1

from chartbrew.

razvanilin avatar razvanilin commented on June 14, 2024

I cannot replicate this issue so it's tricky to figure out what's going on from my end. Have you tried another machine, seen anything returning errors in the docker logs? Any information you can provide is crucial, otherwise I'm pretty blind from my side.

I made 3.2.0 available ahead of release on the razvanilin/chartbrew:3.2.0 tag in Docker. Can you pull that image and run it instead of latest?

https://hub.docker.com/r/razvanilin/chartbrew/tags

from chartbrew.

serve-saeidpour avatar serve-saeidpour commented on June 14, 2024

yes i tried another machine, just i have Previous log for response from 4019,
thnks for razvanilin/chartbrew:3.2.0 now i testing this and again i getting Previous.

from chartbrew.

razvanilin avatar razvanilin commented on June 14, 2024

Can you check the docker logs to see if you notice any errors? The backend should specify that it's running on the 4019 port like here:
CleanShot 2024-03-17 at 12 23 12@2x

Also, what happens when you go to http://localhost:4019? You should get a welcome message: Welcome to chartBrew server API

from chartbrew.

razvanilin avatar razvanilin commented on June 14, 2024

Please add any logs you get over here, otherwise I can't really help

from chartbrew.

StreamlinedStartup avatar StreamlinedStartup commented on June 14, 2024

I encountered a problem while trying to access a Docker instance from another computer using the network IP (192.168.68.73:4018). The front end would display correctly, and I was able to create an account. However, when attempting to log in, I was receiving a network error during the attempt.

Upon Chrome-inspecting the issue (thanks @razvanilin for the suggestion), I noticed that the server was configured to use localhost:4019, as specified in the docker-compose for both ports 4018 and 4019. Interestingly, port 4018 was successfully using my network IP even though it was not explicitly defined in the Docker configuration.

I was able to get it working with this docker-compose:

version: '3.8'
services:
  chartbrew:
    image: razvanilin/chartbrew
    ports:
      - "4019:4019"
      - "4018:4018"
    environment:
      CB_SECRET: "super-secret-password"
      CB_API_HOST: "0.0.0.0"
      CB_API_PORT: "4019"
      CB_DB_HOST: "mysql"
      CB_DB_PORT: "3306"
      CB_DB_NAME: "chartbrew"
      CB_DB_USERNAME: "root"
      CB_DB_PASSWORD: "password"
      VITE_APP_CLIENT_HOST: "http://localhost:4018"
      VITE_APP_CLIENT_PORT: "4018"
      VITE_APP_API_HOST: "http://192.168.68.73:4019"
    depends_on:
      - mysql
    networks:
      - chartbrew_network

  mysql:
    image: mysql:5.7
    ports:
      - "3239:3306"
    environment:
      MYSQL_ROOT_PASSWORD: "password"
      MYSQL_DATABASE: "chartbrew"
    volumes:
      - mysql_data:/var/lib/mysql
    networks:
      - chartbrew_network

volumes:
  mysql_data:

networks:
  chartbrew_network:
    driver: bridge

from chartbrew.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.