Question:
I am trying to connect Wix with an external database that’s self-hosted on a Google VM (not google cloud SQL). Because I have a virtual machine, I am trying to run the velo-external-db adaptor using docker container in the same VM. I use the following command to spin up the velo-external-db container:
sudo docker run --name test -d -p 8080:8080 --env PORT=8080 \
--env TYPE=postgres --env CLOUD_VENDOR=azure --env USER=dsp_user \
--env PASSWORD=fakePass --env DB=deliverydb --env HOST=123.123.123.123 \
--env SECRETKEY=myBigSecret \
--env PERMISSIONS='{ "collectionPermissions": [ { "id": "daily_summaries", "read": ["Admin", "Member"], "write": ["Admin"] } ]}' \
velo_dp_adaptor
On the service page I get the following status:
On the terminal I have also tried to use curl to test the service. I used the command:
curl -L -X POST 'http://example.domain.com:8080/schemas/list' -H 'Content-Type: application/json' --data-raw '{
"requestContext": {
"settings": {
"secretKey": "myBigSecret"
},
"role": "OWNER"
}
}'
but got the error:
{"data":{"description":"Authorization failed: jwt must be a string"},"errorCode":"UNAUTHORIZED"}
What are you trying to achieve:
How can I fix these issues and successfully connect these services with Wix.
What have you already tried:
I’ve tried to seek help from some question like: External Database Configuration for Ubuntu - #10 by wayneatwood-com. But they don’t report the commands used to test the service and the output they get.