How to deploy simple web app to azure using Local Git

I’ve been trying to deploy my web app, I’ve tried using docker, but struggling with dockerfile configuration. So I decided to deploy to Azure using Local Git, still having trouble. Here’s the repo with my web app

I’ve dockerized your application, see

Noteworthy things:

  • I’ve removed the /src directory.
  • The Go application is compiled to a static binary app, see Makefile.
  • The Docker image starts from scratch, no OS is used.
  • The static binary and the template directory are copied to the empty image, see Dockerfile.

Build everything using make:

$ make all

The build container can be run like this:

$ docker run -p 8080:8080 --rm app

I did not publish the image to a Docker repository and I did not try to run it at Azure.


Thanks, I’ll trying to deploy to azure and keep you updated.

It all works and runs until I visit my localhost it shows this. Here are the pics.
Heres my file structure.

Didn’t let me serve on localhost 8080 so I switched to 8084

It ran and then this happens

If you need more info, please tell me

Found and fixed the problem. it was the / before my template. when serving it hahaha

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.