a2svior
MModular
•Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
Actually 0.1.17 wasn't published to
modular-community
yet, but hopefully it will be soon!
Re: this looks very fishy, were there at least any warnings before they decided to wipe all of your data? Crazy494 replies
MModular
•Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
I guess we can call Lightbug production-ready now 😁 (joking)
494 replies
MModular
•Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
https://lightbug.buzz/ is also buzzing along so far
494 replies
MModular
•Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
1. You're using docker run -d
to run the container in detached mode, which is correct for running in the background.
2. At the end of your script, you're executing docker start "$CONTAINER_NAME"
unnecessarily since the container should already be running from the docker run
command.
3. Most importantly, your container is likely stopping immediately after starting because there's no process keeping it alive.
The Solution
To keep your container running without needing to manually restart it, you need to ensure:
1. The container's main process stays running: Docker containers stop when their main process exits.
2. Remove the redundant docker start
command: It's not needed if your container is configured correctly.494 replies
MModular
•Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
494 replies
MModular
•Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
@carlcaulkett asked Claude, it suggests a couple changes in these parts of the script (only sent it the latest section):
494 replies
MModular
•Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
Which command did you use to start it initially?
494 replies
MModular
•Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
Nice 👍
494 replies
MModular
•Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
I'm in DigitalOcean, but on a small droplet using swap files to overcome the ram limitations, I guess that's why it's so slow
494 replies
MModular
•Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
The main server loop logic, we were raising in some cases and the server would stop running, while we should have just logged/returned a BadRequest to the client, e.g in case if malformated requests.
There are still some improvements to be made there, but I'm taking it one step at a time
494 replies
MModular
•Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
Thanks again for catching the bug
494 replies
MModular
•Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
Looks good so far on my end as well!
494 replies
MModular
•Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
I've also got an instance running at https://lightbug.buzz/ , let's see for how long this keeps running
494 replies
MModular
•Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
Yes, let's see 😈
494 replies
MModular
•Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
my bad, didn't push the latest version to Prefix. What about now?
494 replies
MModular
•Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
Couldn't reproduce this exact error but pushed a fix that might solve it. Can you try 0.1.16? https://github.com/Lightbug-HQ/lightbug_http/releases/tag/v0.1.16
494 replies
MModular
•Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
No-no, thanks for all the feedback! It's really valuable , you're catching issues that our integration and unit tests aren't covering 😅
494 replies
MModular
•Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
yeah, looks like the same error. i can check it out this week
494 replies
MModular
•Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
Hmm, we might need to add proper error handling in this part. The server shouldn't die because of this
494 replies
MModular
•Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
Yup , I see it!
494 replies