Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add soketi-app-manager service template 🚀 #4797

Open
wants to merge 2 commits into
base: next
Choose a base branch
from

Conversation

rahulhaque
Copy link

Submit Checklist (REMOVE THIS SECTION BEFORE SUBMITTING)

  • I have selected the next branch as the destination for my PR, not main.
  • I have listed all changes in the Changes section.
  • I have filled out the Issues section with the issue/discussion link(s) (if applicable).
  • I have tested my changes.
  • I have considered backwards compatibility.
  • I have removed this checklist and any unused sections.

Changes

Issues

@peaklabs-dev
Copy link
Member

I think it would make more sense if the database Postgres and probably Redis and so on where in the compose directly as well and use our magic envs for stuff like passwords and so on so it is truly one click. Can you change that please?

@peaklabs-dev peaklabs-dev self-assigned this Jan 14, 2025
@peaklabs-dev peaklabs-dev added ⚙️ Service Issues requesting or PRs adding/fixing service templates. 💤 Waiting for changes PRs awaiting changes from the author. labels Jan 14, 2025
@rahulhaque
Copy link
Author

rahulhaque commented Jan 14, 2025

@peaklabs-dev thank you for your thoughtful feedback. I thought of that as well. However soketi server and my app, both can work with mysql and postgresql. My app doesn't require redis but expects soketi to be run with redis. All of these have separate services under Coolify. Considering everything, finally I went with the bare-bone app leaving other choices to users. Thought my repo will contain instructions on how to set things up. Let me know what do you think of it.

Also, do you have any suggestion on how to automate the laravel app key generation if any.

Edit: You can have a look at the original compose file here. The only difference is the comments.

@rahulhaque
Copy link
Author

@peaklabs-dev as I was exploring other templates, I found that I can follow the WordPress approach as well. It has two services with and without database. That's one option.

To make my app truly one clickable service, I can include soketi server as well and configure nginx to forward websocket request to soketi exposing only one port and domain. But this will make it less flexible and scalable to users.

In any case I'll wait for your feedback. Thank you.

@peaklabs-dev
Copy link
Member

peaklabs-dev commented Jan 16, 2025

  • For the app key you can use ${SERVICE_PASSWORD_APPKEY}
  • I think a service without DB makes sense, and one with DB and soketi too, but if possible use internal Docker networking or the Coolify proxy so you don't have to add nginx, which would not be optimal.

@rahulhaque
Copy link
Author

I think a service without DB makes sense.

So, will the current pull request need any changes from your perspective? Name change (such as - without-database or auto app key generation), anything? The user will have to drop to terminal anyway to migrate the database.

and one with DB and soketi too

Will need some time and proper testing. It would be nice to offer the bare-bone one in Coolify to see how people prefer to use it. Right now I don't have any idea which approach is the best for general use.

if possible use internal Docker networking or the Coolify proxy so you don't have to add nginx, which would not be optimal.

Sure. Will keep that in mind.

@peaklabs-dev
Copy link
Member

Yes, the App Key should be auto generated, and migrations can be automated with a entry point script.

@rahulhaque
Copy link
Author

rahulhaque commented Jan 17, 2025

Auto migration of database working fine on first try. However the app key generation by Coolify magic variable not working as expected. Always getting this error - Unsupported cipher or incorrect key length. I got it working by generating a REALBASE64 key and prefixing that with base64: manually. Any suggestion on automating this through Coolify?

Edit: I mean - APP_KEY=base64:${SERVICE_REALBASE64_APPKEY} is not working. Is it a bug? @peaklabs-dev

@peaklabs-dev peaklabs-dev removed the 💤 Waiting for changes PRs awaiting changes from the author. label Jan 21, 2025
@rahulhaque
Copy link
Author

@peaklabs-dev any update on the APP_KEY generation? I've pushed some changes related to auto migration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️ Service Issues requesting or PRs adding/fixing service templates.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants