Testing against instance with SSL #368
-
Hi. I would like to test socket connection with SSL and I'm thinking about using playground instance. I'm not sure if playground instance are turned off after some time of inactivity. So that would be my first question. Are they? If yes then the title of this discussion takes place. Can I somehow request status of playground instance? I see in node info HTTP status port 8080 but I'm unable to create url which will work. What format should url have to get readiness and liveness ? Maybe in the end I would like to ask other question to avoid all this trouble. It is possible to run thingsDB in container (docker) with certificate so I can test ssl connection with it? I don't see anything related to this in docs. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 9 replies
-
|
Beta Was this translation helpful? Give feedback.
-
@joente If I can run own instance with SSL I would like that. Therefore I don't have too keep instance eating up your resources at playground. Yes I need help with that. I'm not very good with DevOps. But docker is maybe not that important. What I see as bigger issue is to set up github workflow where ThingsDB will be running with SSL. I'm okay if the certificate will be self-signed. I can add |
Beta Was this translation helpful? Give feedback.
-
Maybe I can ask for some help with setting github workflow. My wip workflow is here https://github.com/stefanak-michal/thingsdb-php/blob/workflow/.github/workflows/tests.yml I don't know why but connection to ThingsDB still doesn't work. Unable to connect to 127.0.0.1:9200 (Connection refused) |
Beta Was this translation helpful? Give feedback.
-
Thank you so much for your help. env variable will be good in future. But thanks to you I was able to put together own Dockerfile(s). If somebody is interested I've made Dockerfile for ThingsDB without SSL and with SSL for my github actions. https://github.com/stefanak-michal/thingsdb-php/blob/master/ci/thingsdb.Dockerfile https://github.com/stefanak-michal/thingsdb-php/blob/master/ci/tls.Dockerfile They also already contains discussed Afterwards my github action workflow files looks like this: https://github.com/stefanak-michal/thingsdb-php/blob/master/.github/workflows/tests.yml https://github.com/stefanak-michal/thingsdb-php/blob/master/.github/workflows/tests_tls.yml |
Beta Was this translation helpful? Give feedback.
I've created a Dockerfile for TLS/SSL support in the
dockssl
branch: https://github.com/thingsdb/ThingsDB/blob/dockssl/docker/tls.DockerfileBuild the image:
You need to create a certificate, see: https://github.com/cesbit/tlsproxy/blob/main/README.md
Save the
server.crt
andserver.key
in~/certificates
Next, start the container: