Git Product home page Git Product logo

Comments (8)

fazley-kholil-cko avatar fazley-kholil-cko commented on May 26, 2024 3

@AndrewDryga i have put the environment variable in the docker compose
image

from gandalf.web.

kumarsujendra avatar kumarsujendra commented on May 26, 2024 1

@fazley-kholil-cko , Please follow below steps

API Installation Process
1 Clone https://github.com/Nebo15/gandalf.api
2. Go to code directory
Rename .env.example to .env
3. Run composer install
4. Install Mongodb on same server and make sure it is accessible via localhost:27017 Also start mongodbservere and make sure it is running.
5. Create a database on mongodb database server and update database name in .env file
6. Run php artisan migrate --seed – This will migrate database related configuration in database
7. Browse mongodb server and verify database tables created. Browse auth table and copy API_CLIENTID and API_CLIENTSECRET. This will be use in web configuration
8. Host website on localhost or virtual host for eg.http://gandalf.api We will use apiurl( API_ENDPOINT) in web configuration

Web Installation Process

  1. Clone https://github.com/Nebo15/gandalf.web

  2. Go to code directory

  3. Create a new file .env and add variable PORT, API_ENDPOINT, API_CLIENTID, API_CLIENTSECRET, PROVIDERS_BUGSNAG_APIKEY, PROVIDERS_BUGSNAG_STAGE

  4. Update .env file as below
    PORT=8080
    API_ENDPOINT=http://gandalf.api
    API_CLIENTID=d82f82004384c8835454603277bed410
    API_CLIENTSECRET=+0+^db49+R9WX%sdS-EsZrK!'uVe;H
    PROVIDERS_BUGSNAG_APIKEY=
    PROVIDERS_BUGSNAG_STAGE=

  5. Run below command
    Npm install
    npm i -g bower gulp
    bower install
    gem install compass
    Make sure all command executed successfully, If you get any error, try to install all dependency and related library. Otherwise application will not work

  6. gulp ## build and open Gandalf on http://localhost:8080 and watch file changes

FYI @AndrewDryga

from gandalf.web.

AndrewDryga avatar AndrewDryga commented on May 26, 2024

Hey @fazley-kholil-cko, can you show environment variables you are using to start web and api containers? Check out .env.example file, it has inline docs on env variables: https://github.com/Nebo15/gandalf.api/blob/master/.env.example

from gandalf.web.

fazley-kholil-cko avatar fazley-kholil-cko commented on May 26, 2024

@kumarsujendra Thanks for the help.

from gandalf.web.

Gabo-LTM avatar Gabo-LTM commented on May 26, 2024

@kumarsujendra I followed your steps, and everyone was successfully accomplished, but I have troubles seen the Gandalf.API service, I testing with curl in port 9000, but i get nothing, any ideas?

the php-fpm is on , I see the port open and acceping requests and the php-fpm pointed to the folder where the project is it.

from gandalf.web.

kumarsujendra avatar kumarsujendra commented on May 26, 2024

@Gabo-LTM ,

  1. Are you sure about API Installation Process ? Basically this is backed and should works correctly.
    Open URL in browser and check response. This should return "OK" message. For eg. API_ENDPOINT is http://gandalf.api If this returns any error like 500 error, You need to add htaccess file in /public directory to remove index.php from URL and give 0777 permission on /storage directory.

Try debugging API_ENDPOINT url and make sure this returns "OK" response. Otherwise Web will not work correctly. Because Web use web service and API_ENDPOINT process same in back-end

  1. Check step 4 in Web Installation Process and update API_ENDPOINT=http://gandalf.api correctly.

  2. There is a files in web installation directory server/index.js . This need to be run by PM2 service.
    On my local server I use npm start server/index.js . When you hit this command in console, this will take some time and show output as Gandalf is running on localhost:8080

  3. Open http://localhost:8080 or http://your_server_id:8080/ and input credentials (demo/demo) to login.

from gandalf.web.

Gabo-LTM avatar Gabo-LTM commented on May 26, 2024

@kumarsujendra

  1. permission checked, I include an .htaccess file in public directory and restart the api server. The url doesn't return ok (see below)
    image

  2. env file checked, the API server is in another server (see below)
    image

  3. I usually launch with gulp , but I tried this way and same result (fist image with gulp, second directly with npm)
    image
    image

  4. I tested the demo/demo user and same result
    image

the only difference is I used the docker container and configure it, I'll try make the gandalf.api from the ground.

any advice is welcome

from gandalf.web.

kumarsujendra avatar kumarsujendra commented on May 26, 2024

@Gabo-LTM ,

  1. Basically you have problem with API installation. API endpoint is http://172.17.0.2:9000/
    This should return "OK" response. API end point is based on Lumen framework and should worked separately. It uses MongoDb database. Check .ENV file and make sure you have done DB migration correctly.

  2. Run DB migration script
    $ php artisan migrate --seed – This will migrate database related configuration in database
    Browse mongodb server and verify database tables created. Browse auth table and copy API_CLIENTID and API_CLIENTSECRET. This will be use in web configuration

  3. Why not you use http://172.17.0.2:80 for API and http://172.17.0.2:8080 for web
    Apache/Nginx default port default is 80 and I think you should use default port. Docker compose file uses default port for Apache/Nginx as mentioned here

from gandalf.web.

Related Issues (13)

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.