rosscdh
rosscdh
TTwenty
Created by rosscdh on 10/18/2024 in #❓︱help
rest api 500 errors permanent
sort of.. 1. I encountered and raised the REDIS_URL issue yesterday, the fix was to add REDIS_HOST 2. this issue was because the server is set to run on 3000 and issues tokens based on that port .... however... if in compose you say .. outer port is 3010:3000 <-- inner port maps the server will not recognise requests coming in on 3010 ... its a bit weird tbh.. security should not be bound to ports imho.
15 replies
TTwenty
Created by rosscdh on 10/18/2024 in #❓︱help
rest api 500 errors permanent
👍
15 replies
TTwenty
Created by rosscdh on 10/18/2024 in #❓︱help
rest api 500 errors permanent
I just... found the issue... docker compose ports: - 3010:3000 <---- it seems the system uses the internal running port as part of the token generation I changed to run on 3010 via the env var and the internal port mapping and voila
curl -vv --request GET \
--url http://0.0.0.0:3010/rest/people \
--header 'Accept: application/json' \
--header "Authorization: Bearer $TWENTY_TOKEN"
Note: Unnecessary use of -X or --request, GET is already inferred.
* Trying 0.0.0.0:3010...
* Connected to 0.0.0.0 (127.0.0.1) port 3010 (#0)
> GET /rest/people HTTP/1.1
> Host: 0.0.0.0:3010
> User-Agent: curl/7.86.0
> Accept: application/json
> Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI4MmU0MDIwOC04MGJhLTRkYTYtYjMwNi1hNzI5MTYyY2NjYzAiLCJpYXQiOjE3MjkyNDIwNzYsImV4cCI6NDg4Mjg0NTY3NSwianRpIjoiODNmNDY1YjUtOWM4Yi00OWJlLThkMWEtMWJmNGJmMjc0YjEzIn0.LP27QrRBODO3po7QQaDbwdsy4VE97onmXWIy_m9nYJ8
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< X-Powered-By: Express
< Access-Control-Allow-Origin: *
< Content-Type: application/json; charset=utf-8
< Content-Length: 2299
< ETag: W/"8fb-cGcSEvhkxKBG0V5scMggwbnY/Us"
< Date: Fri, 18 Oct 2024 09:13:20 GMT
< Connection: keep-alive
< Keep-Alive: timeout=5
<
* Connection #0 to host 0.0.0.0 left intact
{"data":{"people":[{"id":"44c34c5b-b5bc-46aa-9b30-4128f93a48c0","jobTitle":"","city":"","avatarUrl":"","position":0,"createdAt":"2024-10-18T07:12:46.136Z","updatedAt":"2024-10-18T07:12:46.136Z","deletedAt":null,"companyId":null,"company":null,"name":{"firstName":"Scott Jack","lastName":""},"emails":{"primaryEmail":"","additionalEmails":null},"linkedinLink":{"primaryLinkLabel":"","primaryLinkUrl":"","secondaryLinks":null},"xLink":{"primaryLinkLabel":"","primaryLinkUrl":"","secondaryLinks":null},"phones":{"primaryPhoneNumber":"
curl -vv --request GET \
--url http://0.0.0.0:3010/rest/people \
--header 'Accept: application/json' \
--header "Authorization: Bearer $TWENTY_TOKEN"
Note: Unnecessary use of -X or --request, GET is already inferred.
* Trying 0.0.0.0:3010...
* Connected to 0.0.0.0 (127.0.0.1) port 3010 (#0)
> GET /rest/people HTTP/1.1
> Host: 0.0.0.0:3010
> User-Agent: curl/7.86.0
> Accept: application/json
> Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI4MmU0MDIwOC04MGJhLTRkYTYtYjMwNi1hNzI5MTYyY2NjYzAiLCJpYXQiOjE3MjkyNDIwNzYsImV4cCI6NDg4Mjg0NTY3NSwianRpIjoiODNmNDY1YjUtOWM4Yi00OWJlLThkMWEtMWJmNGJmMjc0YjEzIn0.LP27QrRBODO3po7QQaDbwdsy4VE97onmXWIy_m9nYJ8
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< X-Powered-By: Express
< Access-Control-Allow-Origin: *
< Content-Type: application/json; charset=utf-8
< Content-Length: 2299
< ETag: W/"8fb-cGcSEvhkxKBG0V5scMggwbnY/Us"
< Date: Fri, 18 Oct 2024 09:13:20 GMT
< Connection: keep-alive
< Keep-Alive: timeout=5
<
* Connection #0 to host 0.0.0.0 left intact
{"data":{"people":[{"id":"44c34c5b-b5bc-46aa-9b30-4128f93a48c0","jobTitle":"","city":"","avatarUrl":"","position":0,"createdAt":"2024-10-18T07:12:46.136Z","updatedAt":"2024-10-18T07:12:46.136Z","deletedAt":null,"companyId":null,"company":null,"name":{"firstName":"Scott Jack","lastName":""},"emails":{"primaryEmail":"","additionalEmails":null},"linkedinLink":{"primaryLinkLabel":"","primaryLinkUrl":"","secondaryLinks":null},"xLink":{"primaryLinkLabel":"","primaryLinkUrl":"","secondaryLinks":null},"phones":{"primaryPhoneNumber":"
15 replies
TTwenty
Created by rosscdh on 10/18/2024 in #❓︱help
rest api 500 errors permanent
sorry im so keen to use this tooling its looks so great..
15 replies
TTwenty
Created by rosscdh on 10/18/2024 in #❓︱help
rest api 500 errors permanent
I redownloaded the original one.. but that one breaks due to the REDIS_HOST issue thats an issue in github already..
15 replies
TTwenty
Created by rosscdh on 10/18/2024 in #❓︱help
rest api 500 errors permanent
but none of that would affect system internals afaik
15 replies
TTwenty
Created by rosscdh on 10/18/2024 in #❓︱help
rest api 500 errors permanent
Cant include compose becuase discord char limit almost stock compose 1. dont use data volumes i prefer local mounts 2. commented out exposed ports on redis and psotgres as dont need to debug data 3. commented restart: always.. this is not production 4. 3010:3000 for main port on server
15 replies
TTwenty
Created by rosscdh on 10/18/2024 in #❓︱help
rest api 500 errors permanent
Hey thanks.. as responded its a stock standard docker compose no magic..
15 replies
TTwenty
Created by hoang2601 on 10/16/2024 in #❓︱help
Build with only one docker file
docker-build:
docker build -t twentycrm/twenty:local -f packages/twenty-docker/twenty/Dockerfile .
docker-build:
docker build -t twentycrm/twenty:local -f packages/twenty-docker/twenty/Dockerfile .
works for me
4 replies