arran 🇦🇺

  • 0 Posts
  • 19 Comments
Joined 1 year ago
cake
Cake day: September 23rd, 2023

help-circle

















  • I feel like I have been doing this all my life. I think it’s more to do with the depth of understanding too. But the environment has to support it, if there is an expectation that everyone is an expert from day one, and there is no room for self improvement then it can’t be done.

    As stated there are down falls with the approach such as lack of exposure to new ideas. You still need to look just not study. But to me it’s also a work/life balance policy. But don’t practice it in extreme as it can hold you back. Good work places should allow for some learning time and I’m hoping that gets normalized.


  • The busybox one seems great as it comes with shells. php looks like it would add some issues.

    Personally since I use go, I would create a go embedded app, which I would make a deb, rpm, and a dockerfile using “goreleaser”

    package main
    
    import (
    	"embed"
    	"net/http"
    )
    
    //go:embed static/*
    var content embed.FS
    
    func main() {
    	http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
    		// Serve index.html as the default page
    		http.ServeContent(w, r, "index.html", nil, content)
    	})
    
    	// Serve static files
    	http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.FS(content))))
    
    	// Start the server
    	http.ListenAndServe(":8080", nil)
    }
    

    Would be all the code but allows for expansion later. However the image goreleaser builds doesn’t come with busybox on it so you can’t docker exec into it. https://goreleaser.com/customization/docker/

    Most of the other options including the PHP one seem to include a scripting language or a bunch of other system tools etc. I think that’s overkill