Giter Site home page Giter Site logo

Comments (12)

inshop avatar inshop commented on May 28, 2024

Hey!

I see you have changed JWT_PASSPHRASE=verystrongpassword
Did you regenerate your JWT certificates?

Try to run following commands and type your new JWT password on prompt a few times:

openssl rsa -pubout -in config/jwt/private.pem -out config/jwt/public.pem
openssl rsa -in config/jwt/private.pem -out config/jwt/private2.pem
mv config/jwt/private.pem config/jwt/private.pem-back
mv config/jwt/private2.pem config/jwt/private.pem

from inshop-crm-api.

chephei avatar chephei commented on May 28, 2024

Hey,

The same error appeared "Username or password are incorrect", I uncommented it with lines from setup.sh and ran the command again.

docker-compose exec --user=root php sh ./setup.sh

#!/bin/bash

openssl genrsa -out config/jwt/private.pem -aes256 4096
openssl rsa -pubout -in config/jwt/private.pem -out config/jwt/public.pem
openssl rsa -in config/jwt/private.pem -out config/jwt/private2.pem
mv config/jwt/private.pem config/jwt/private.pem-back
mv config/jwt/private2.pem config/jwt/private.pem

composer install

php bin/console make:entity App --regenerate -n
php bin/console doctrine:database:drop --if-exists --force
php bin/console doctrine:database:create
php bin/console doctrine:schema:update --force
php bin/console doctrine:schema:validate
php bin/console doctrine:migration:migrate --no-interaction
php bin/console doctrine:fixtures:load --append

php bin/console elastica:index:search
php bin/console elastica:index:product

this message appears during a run of setup.sh

image

from inshop-crm-api.

inshop avatar inshop commented on May 28, 2024

Check if your API working well, in our case Username or password are incorrect error appears on any incorrect response from the backend

from inshop-crm-api.

chephei avatar chephei commented on May 28, 2024

Do I need to use these both services at the same time?

inshopgroup/docker-inshop-crm-api-nginx-prod:latest
inshopgroup/docker-inshop-crm-api-php-fpm-prod:latest

log client get erro 304

client_1         | 187.114.111.52 - - [24/Nov/2020:01:04:59 +0000] "GET /signin HTTP/1.1" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36"

logs php

php_1            | [24-Nov-2020 00:50:21] NOTICE: fpm is running, pid 1
php_1            | [24-Nov-2020 00:50:21] NOTICE: ready to handle connections

logs nginx

nginx_1          | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
nginx_1          | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
nginx_1          | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
nginx_1          | 10-listen-on-ipv6-by-default.sh: Getting the checksum of /etc/nginx/conf.d/default.conf
nginx_1          | 10-listen-on-ipv6-by-default.sh: error: /etc/nginx/conf.d/default.conf differs from the packaged version
nginx_1          | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
nginx_1          | /docker-entrypoint.sh: Configuration complete; ready for start up

from inshop-crm-api.

inshop avatar inshop commented on May 28, 2024

Yes, both services needed, and in production, you should point your API domain to nginx.
Also, take a look at CORS configuration on the API. You also should whitelist your client domain

from inshop-crm-api.

chephei avatar chephei commented on May 28, 2024

I made the changes inside the .env file, but I have the same error, I need to change something else? remembering that I'm using the repository's git file inshop-crm-api

TRUSTED_PROXIES=127.0.0.1,127.0.0.2,192.168.15.15
TRUSTED_HOSTS=127.0.0.1,192.168.15.15,localhost
CLIENT_URL=http://192.168.15.15:3000
CORS_ALLOW_ORIGIN=^http?://(localhost|192.168.15.15)(:[0-9]+)?$

from inshop-crm-api.

inshop avatar inshop commented on May 28, 2024

Do you have any errors in the browser console?

from inshop-crm-api.

chephei avatar chephei commented on May 28, 2024

Hey,
In f12 shows the error "ERR_CONNECTION_REFUSED" where can I change this API localhost?

image

in my api show this

"code": 401,
"message": "JWT Token not found"

I already ran these commands with the password of .env "JWT_PASSPHRASE"

image

openssl genrsa -out config/jwt/private.pem -aes256 4096
openssl rsa -pubout -in config/jwt/private.pem -out config/jwt/public.pem
openssl rsa -in config/jwt/private.pem -out config/jwt/private2.pem
mv config/jwt/private.pem config/jwt/private.pem-back
mv config/jwt/private2.pem config/jwt/private.pem

There is no volume of keys for the container, where these 'folder path' keys are inside the container? this may be one of the problems

image

from inshop-crm-api.

inshop avatar inshop commented on May 28, 2024

check .env file in the client project

from inshop-crm-api.

chephei avatar chephei commented on May 28, 2024

Hello, I add in .env

VUE_APP_API_URL=http://192.168.15.15:8888

image

image

image

do i need to do anything else?

Ty

from inshop-crm-api.

inshop avatar inshop commented on May 28, 2024

It's a CORS configuration question, please check documentation https://github.com/nelmio/NelmioCorsBundle

from inshop-crm-api.

chephei avatar chephei commented on May 28, 2024

It try using CORS env, but dont work.

I couldn't get this application into production using the docker, you need some ready-made recipe from the docker-compose?

from inshop-crm-api.

Related Issues (8)

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.