How to run Gogs behind HAProxy serving https (SSL/TLS) connections

I run Gogs in a LXD container which runs behind HAProxy in another LXD container. HAProxy handles SSL/TLS connection (SSL Termination).

Note: Gogs is a Git service like GitHub or GitLabs. It is written in Go and normally used to host your own git server along with GitHub like interface and functionality (for free).

As you know, Gogs normally starts on non-standard ports so it doesn’t need super-user access. The following is a sample configuration ( custom/conf/app.ini ) for Gogs running internally on HTTP port 3000 while being served by a regular HTTPS URL (running on regular HTTPS port where SSL/TLS termination is provided by HAProxy):

[server]
DOMAIN           = gogs-domain.com
HTTP_PORT = 3000
ROOT_URL = https://gogs-domain.com/
DISABLE_SSH = false
SSH_PORT = 3333 START_SSH_SERVER = false OFFLINE_MODE = false

BitBucket vs. GitHub vs. ProjectLocker: Where would you setup your closed source project for free and why

Each of the Source Code repositories come with a free tier but each has their own restrictions
BitBucket from Atlassian is free for small team up to 5 users or you can self-host for up to 10 members for one time fee of 10$. With the free plan in cloud, you can have unlimited public and private repositories.
GitHub doesn’t allow private repositories at this time. While you may host closed source project there, I wouldn’t recommend it.
ProjectLocker provider a free tier: 1 user, 1 project and up to 50 MB of storage.
All three supports Git which is probably the most widely used Source Control system these days.
Of the three BitBucket stands out in hosting closed source private repositories for free. Overall their pricing is most lucrative in the long run.
GitHub, while not free, has the most traction.