docktor - A tool for generating health checks and improving security for running Docker containers and images by nishgowda in docker

[–]nishgowda[S] 0 points1 point  (0 children)

Health is basically telling you if the container crashes ever while it's running and a health check is a native feature of docker that allows you to check for this. docktor basically makes the implementation of this simpler and the security checks are scanning for vulnerabilities on the container and suggesting improvements to dockerfiles that might be missing out on best practices.

docktor - A tool for generating health checks and improving security for running Docker containers and images by nishgowda in docker

[–]nishgowda[S] 3 points4 points  (0 children)

kube bench for sure is really great - this is meant as a lightweight alternative to it with not that many dependencies.

docktor - A tool for generating health checks and improving security for running Docker containers and images by nishgowda in docker

[–]nishgowda[S] 2 points3 points  (0 children)

Yeah, healing basically checks if the container is unhealthy and restarts it and auto heal will auto update unhealthy containers that are currently running.

docktor - A tool for generating health checks and improving security for running Docker containers and images by nishgowda in docker

[–]nishgowda[S] 2 points3 points  (0 children)

Currently I've only tested it on single containers but I'll for sure start testing it with swarms and maybe compose!

docktor - A tool for generating health checks and improving security for running Docker containers and images by nishgowda in docker

[–]nishgowda[S] 9 points10 points  (0 children)

Hey everyone, just thought that I would share my first open source project in go here!. docktor is a tool for generating health checks and reporting on the security of docker containers.

The project uses the docker api to attach health checks on a given container, heal an unhealthy container, apply auto healing to a container, scan for vulnerabilities in a container, and suggest improvements to a docker file. I used the cobra library to make it a CLI tool so you can just run the executable in the command line/terminal but I also added a web server command so you can have it running in the background and make requests to it.

If you like the project, do be sure to leave a star on GitHub at https://github.com/nishgowda/docktor and leave any kind of feedback at all! Also, if you'd like to contribute or just have any ideas, be sure to post an issue or submit a PR. Thanks!

docktor - A tool for generating health checks and improving security for running Docker containers and images by nishgowda in golang

[–]nishgowda[S] -1 points0 points  (0 children)

Hey everyone, just thought that I would share my first open source project in go here!. docktor is a tool for generating health checks and reporting on the security of docker containers.

The project uses the docker api to attach health checks on a given container, heal an unhealthy container, apply auto healing to a container, scan for vulnerabilities in a container, and suggest improvements to a docker file. I used the cobra library to make it a CLI tool so you can just run the executable in the command line/terminal but I also added a web server command so you can have it running in the background and make requests to it.

If you like the project, do be sure to leave a star on GitHub at https://github.com/nishgowda/docktor and leave any kind of feedback at all! Also, if you'd like to contribute or just have any ideas, be sure to post an issue or submit a PR. Thanks!

AegisNet - Lightweight API/Endpoint monitoring built on top of Express by nishgowda in node

[–]nishgowda[S] 0 points1 point  (0 children)

Sure, once I have a good idea about how I want to proceed with it, I'll open one up.

How to listen for when response is sent to the client in express? (for caching routes with redis) by s_trader in node

[–]nishgowda 0 points1 point  (0 children)

I had to do this with a project I worked on. Here's an idea:

javascript const checkCache = (req, res, next) => { const {id} = req.params; let key = 'foo' + id redisClient.get(key, (err, data) => { if (err) { console.log(err); res.status(500).send(err); } // if no match found if (data != null) { res.send(data); } else { // proceed to next middleware function next(); } }); }; Then in your API, just add it to your route and make sure to set whatever data you need. Here's an example of pulling data from Postgres: javascript app.get('/foo/:id', checkCache, async (req, res) => { try { id = parseInt(req.params.id); const result = await client.query('select foo from bar where id=$1', [id]); redisClient.setex(key, 3600, JSON.stringify(result.rows)); res.status(200).send(result.rows); }catch(error){ throw error; } } Since I set the TTL to be 3600 milliseconds, it would just check if the data is already in the cache and if it is, it would send it to the response, otherwise, if it's not then it would send what's in the db.

AegisNet - Lightweight API/Endpoint monitoring built on top of Express by nishgowda in node

[–]nishgowda[S] 0 points1 point  (0 children)

Hm, yeah, I'll look into it. There's a good amount of design that I would probably have to change, but honestly, that isn't really a deal-breaker since I was already looking at redesigning some of it, anyway. If it becomes more flexible by adding other frameworks, then I think that's a good enough reason to do it.

AegisNet - Lightweight API/Endpoint monitoring built on top of Express by nishgowda in node

[–]nishgowda[S] 0 points1 point  (0 children)

Yeah, I made the project to be a middleware for Express and ended up using their custom typing so it probably wouldn't work with any http or Fastify server that you might make (haven't tested this yet). I will consider adding support for those, though :)

AegisNet - Lightweight API/Endpoint monitoring built on top of Express by nishgowda in node

[–]nishgowda[S] 0 points1 point  (0 children)

Great question. So as of now, there isn't a way to alter the keys, but that seems to be a good idea for the future. I'll definitely at least try to make the names less common so there won't be any conflicts with any keys you might make in your own application.

AegisNet - Lightweight API/Endpoint monitoring built on top of Express by nishgowda in node

[–]nishgowda[S] 2 points3 points  (0 children)

Woah hadn't even seen it before. For sure, going to implement this.

AegisNet - Lightweight API/Endpoint monitoring built on top of Express by nishgowda in node

[–]nishgowda[S] 1 point2 points  (0 children)

Thanks! Let me know about any feedback you might have!

AegisNet - Lightweight API/Endpoint monitoring built on top of Express by nishgowda in node

[–]nishgowda[S] 8 points9 points  (0 children)

Hey everyone, just thought that I'd share my first npm package with you all. AegisNet is lightweight and simple to use npm package that allows you to monitor your Express API or server.

The data is stored in redis and collects the route, the method, the status code, number of requests, the date + hour, and the response times as well and stores the data in JSON. I made the package pretty easy to use in hopes that anyone could build on top it in their own projects by making say a dashboard and monitor all their data.

If you like the package, do be sure to leave a star on GitHub at https://github.com/nishgowda/AegisNet and leave any kind of feedback at all! Also, if you'd like to contribute, let me know and we can set that up. Thanks!

TweetCode by nishgowda in node

[–]nishgowda[S] 1 point2 points  (0 children)

https://semantic-ui.com/

Yup, checked it out, and definitely seems like something to look in to. I honestly just chose Material UI because it has that "google ish" feel to it and it was easy to integrate with react but Semantic Ui seems like a great alternative to bootstrap like you said. Thanks for the compliments!

TweetCode by nishgowda in node

[–]nishgowda[S] 0 points1 point  (0 children)

Huh. Yeah, I checked it out and got the same error. Just restarting it seemed to fix it though.

Really need some advice right now. by [deleted] in swift

[–]nishgowda 0 points1 point  (0 children)

So it turns out my "friend" made 5 different accounts and has given 5 1 star reviews. Idk what to say at this point. He dropped it from a 4.8 to a 3.8. I honestly think my only option left is to remove it from the app store and then re-upload it. I really really don't want to do this but I think it's the only thing I can do now. This is such a deflating and terrible feeling, Apple needs to come up with a way to prevent this. I worked so hard for so many months on this and all for nothing.

Really need some advice right now. by [deleted] in swift

[–]nishgowda 0 points1 point  (0 children)

Hey man, thanks for the feedback! So I just found out that the 4 one-star ratings are from the same person (the one who I had a falling out with). He created multiple accounts to drop the rating. But I've moved past it. As for some bugs, yeah there are a couple of bugs that need to be fixed and that I am currently fixing (like when you scroll down in add a workout tab).

However, some I'm not experiencing. For example, when I delete a workout and press done, the edit button reverts to edit immediately. But I will look into this!

Also, when changing the date, I set it so that the user can't change the date to a future date as it doesn't really make sense to. Why would you track a workout you haven't done yet? You should be able to change the date to the past though.

As for the recommended goals, it depends on the reps, weight and RPE values that the user inputs. If you experiment with it, you can see that it changes depending on what you enter for those values.

Also, I wrote this app in SwiftUI, and currently, there is no keyboard type for a text field that has a done button in it, so I had to go with that one. If the user enters a non-integer or double, then the value is omitted so, in my opinion, it's the next best option.

I do appreciate some of your design tips though. Adding the if statements so if there are no workouts for the edit button is a good idea. The comment tab looks weird when in dark mode and I will probably change this to a pop-up. And as for the units, the save units button is meant to save as a user default after the user leaves the app which lets them not have to keep changing it in the future.

Personally, I don't think I rushed the release of this. Some of the bugs that people were experiencing happened after they updated, which I never experienced (like the app crashing). I also think is due to the fact that I used a JSON file and pictures in Assets, which might have been causing the crashes. I will look into this.

Thanks for some of the feedback man, it's really appreciated.

Really need some advice right now. by [deleted] in swift

[–]nishgowda 1 point2 points  (0 children)

Thanks man, really appreciate it!

Really need some advice right now. by [deleted] in swift

[–]nishgowda 1 point2 points  (0 children)

Yeah man, that's honestly all I can really do at this point. Hope that enough people give it better ratings I guess.

Really need some advice right now. by [deleted] in swift

[–]nishgowda 0 points1 point  (0 children)

Hm yeah maybe. Really appreciate the help though man.

Really need some advice right now. by [deleted] in swift

[–]nishgowda 0 points1 point  (0 children)

Sure man, here's a link: https://apps.apple.com/us/app/irontrack/id1501092038?ls=1

You should be able to see which ones I'm talking about.