Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
I’m getting a “500 Internal Server Error - nginx/1.17.3” when I try to access the url via HTTPS. I’ve exposed port 443 (i’m on AWS). Any idea why it wouldn’t work?
All other things being equal, I want to serve files from a public directory I placed in the same level with the main.go file. Then in the main.go, this is my new main function:
func main() {
http.Handle("/", http.FileServer(http.Dir("./public")))
log.Fatal(http.ListenAndServe(":80", nil))
}
But I now get the 404 page after running docker-compose. Please help. I thought the
COPY . .
line in the Dockerfile copies the project file listing as is. And too, there is an index.html in the public folder
This is not a very well made tutorial, at least add how to remove the stuff u brought up ;(
Thanks for the article. I was able to make it work without much complication. It was helpful. I do have a question though:
Presumably the Let’s Encrypt container that’s already running needs to see that LETSENCRYPT_HOST=example.com that you specify only later in the process. How does it obtain that? (I’m just asking for a bit more context on what is going on here.)
I believe the answer is that the code in the two containers that are already running are Docker-aware and use docker.sock to monitor the addition of additional containers on the host. When they see a new container added, they check if the new container has “env” variables set. If so, they read them and if those variable suggest that the new container would like LETSENCRYPT proxying, those containers start to do that.
Did I get that right?
Hello,
Thank you for this clear and simple documentation. I followed instructions and it worked!
I just wonder about something. For example I have 2 applications. One of them is production second of them development.
I want to serve first one in www.example.com and second one in dev.example.com.
I tried but console returns ‘Bind for 0.0.0.0:443 failed: port is already allocated’.
I don’t want to serve another port I want to serve both of them in 80 and 443.
Can you help me with that? Maybe you can give me some keyword for search it on google or something.
Thank you very muck again this simple and clear documentation.
This tutorial is broken once you try to run the go dockerfile.
Step 5/12 : RUN go get ./...
---> Running in bad124bb32eb
go: cannot find main module; see 'go help modules'
ERROR: Service 'go-web-app' failed to build: The command '/bin/sh -c go get ./...' returned a non-zero code: 1
I’m not familiar with Go at all, but this SO post said something about go-wrapper being deprecated.
A working fix is to replace the first line in the Dockerfile with:
FROM golang:1.9.6-alpine AS build
However, someone more experienced with GO should probably suggest a more up-to-date solution.
Hello, how can I make Docker recompile my Programm? When i run “docker-compose -f go-app-compose.yaml up -d” my Website doesnt change…
If you are having a problem where the command line doesn’t give you errors, but your website still isn’t secure, you might have checked out too many Let’s Encrypt duplicate certificates for the week. ( https://letsencrypt.org/docs/rate-limits/ )
You can check how many certificates you’ve gotten using this website: https://crt.sh/
If you have checked out too many certificates you can retry next week or add/remove domain names in your go-app-compose.yaml file. For example: environment: - VIRTUAL_HOST= www.example1.com, www.example2.com - LETSENCRYPT_HOST= www.example1.com, www.example2.com
Also, after you’ve had this problem, you might get a 502 bad gateway error on your computer when you visit your website. If you do, try using another device to go to your website or clear all your cookies on your computer: https://www.keycdn.com/support/502-bad-gateway
From a snyk scan it seems the latest version of jwilder/nginx-proxy is riddled with security bugs. There are 5 critical and 5 high severity vulnerabilities related to the bullseye dependency. Not sure if any/all of these are false positives, but might be worth considering setting up your own image.