openblocks-dev / openblocks

🔥 🔥 🔥 The Open Source Retool Alternative
https://cloud.openblocks.dev
GNU Affero General Public License v3.0
5.71k stars 342 forks source link

Support for stateless container #155

Open bgwastu opened 1 year ago

bgwastu commented 1 year ago

Does openblocks run on stateless container and works without database when the app deployed?

As always, thank you for building this great tool!

neon-balcony commented 1 year ago

Hey @bagaswastu ,

Thanks for the post, Openblocks is a platform for those built apps to run on, and Openblocks uses a MongoDB for fetching workspace/user/app/... data and a Redis for maintaining user sessions. So I would say Openblocks is stateful in nature. But it does not require your extra data storages if you're just using a single self-hosted instance with container built-in MongoDB and Redis.

bgwastu commented 1 year ago

Thank you for your response.

I see that Openblocks uses supervisord to run multiple services in a single container. If I'm using my own Redis and Mongo services, do I still need to specify a volume in the Docker container? I'm planning to deploy Openblocks on Google Cloud Run, but since the container is stateless on Cloud Run, I'm worried that I won't be able to deploy without specifying a volume.

neon-balcony commented 1 year ago

I see, I think it should be OK without specifying volume in docker setup if you're using your own Redis and MongoDB. And you just need to specify environment variables for your MongoDB and Redis URI then.

rhuanbarreto commented 1 year ago

But MongoDB and Redis are still being started by suervisord if the environment variables are set, which can cause issues if you mount volumes in k8s (Specially in Azure Files that you need to set mount specific options to avoid having a crashed mongodb due to file permission issues for WiredTiger).

neon-balcony commented 1 year ago

@rhuanbarreto Got it, it seems that we can provide a pure version Openblocks without built-in MongoDB and Redis. We've added it to our backlog and thanks for the info 😄

dizzy-duality commented 1 year ago

We would love this feature as wel!

YoJayz commented 1 year ago

Hi everyone, separate images of follwing services are available now:

The detailed info about self-hosting with separate images is provided in this doc: https://docs.openblocks.dev/self-hosting#multi

Hope you find this helpful for stateless containers in cluster environment! 😃

tboulogne commented 1 year ago

hello @YoJayz,

I'm trying to use the multi-container and i face a strange issue in api-service : image

Tried with environment variable REDIS_URI or REDIS_URL, same.

Any idea to solde please ?

Thanks for help.

Regards

YoJayz commented 1 year ago

hello @YoJayz,

I'm trying to use the multi-container and i face a strange issue in api-service : image

Tried with environment variable REDIS_URI or REDIS_URL, same.

Any idea to solde please ?

Thanks for help.

Regards

Hi @tboulogne For better understanding of this issue, would you please provide your masked REDIS_URI to us?

tboulogne commented 1 year ago

yes,

tried both :

REDIS_URL=redis://<user>:<password>@<service>:6379
REDIS_URI=redis://<user>:<password>@<service>:6379
jerry-goodman commented 1 year ago

REDIS_URL=redis://user>:<password>@<service:6379 looks fine, can you connect to it successfully with other Redis clients?

tboulogne commented 1 year ago

@jerry-goodman yes i tried with redis-cli from app container and the connection to redis container is ok.

YoJayz commented 1 year ago

@jerry-goodman yes i tried with redis-cli from app container and the connection to redis container is ok.

Sorry for the late reply @tboulogne Would you like to join our official Discord server so that our engineer can have a private chat in detail with you?

tboulogne commented 1 year ago

hello @YoJayz just joined :-). Let me know.