ItsEcholot / ContainerNursery

Puts Docker Containers to sleep and wakes them back up when they're needed
MIT License
94 stars 6 forks source link

Display Name on placeholder page #55

Closed Samurai1201 closed 8 months ago

Samurai1201 commented 9 months ago

Added a variable in the config file that is used on the placeholder instead of the container name. Users can now set a different name to be displayed on the placeholder just by setting the fancyName variable in the config file.

Resolves #44

ItsEcholot commented 8 months ago

Thanks for the PR, could we change the name of the config & feature from fancyName to displayName? That way the meaning behind the configuration is better conveyed. Besides that, it looks good to me.

Samurai1201 commented 8 months ago

Yes that would actually be easier to understand for the user. Updated everything to display name, instead of fancy name. Should be ready to merge.

ItsEcholot commented 8 months ago

Sorry, one more change request: Could we make the setting displayName optional and fall back to the current way of just using containerName for the x-container-nursery-container-name header if displayName is not present?

That way this wouldn't be a breaking change which requires everyone to add displayName for every container in their settings file.

Samurai1201 commented 8 months ago

No problem, didn't think about how this could affect people updating...

Added fall back to containerName and updated Readme to represent displayName as optional.

ItsEcholot commented 8 months ago

Merged, thanks! I will create a release and push it to the container registry 👍

ItsEcholot commented 8 months ago

Docker image released 🎉

Samurai1201 commented 8 months ago

The new version doesn't seem to include the patch... I just updated to add the displayName function to my setup, but it didn't work as expected. So i checked the compiled code in the build folder of the container and it didn't contain the patch. I'm somewhat new to docker, but in my testing I always had the use npm run build before using docker build ..

ItsEcholot commented 8 months ago

@Samurai1201: You are absolutely right, thanks. I got so focused on getting the multi-arch build process working (again) that I completely forgot to actually transpile the source. Should be fixed in the latest docker image.