I am doing a simple web server using Go and it will be deployed to AWS using docker. I want to enable HTTPS so I guess I need to read TLS certs from the golang image I am using. Wonder how to check where the certs are in the go image so that I can read them in my code, in a form of something like:
s := http.Server{
Addr: 443,//fmt.Sprintf(":%s", port),
ReadTimeout: 5 * time.Second,
WriteTimeout: 10 * time.Second,
IdleTimeout: 20 * time.Second,
Handler: myHandler,
}
log.Println("Go proxy server is running on port:" + port)
err := s.ListenAndServeTLS("cert.crt", "private-key.key") // read from where?
if err != nil {
log.Fatal(err)
}