Eliminate the need to manually edit Nginx configuration files by using Nginx Proxy Manager developed by Jamie Curnow and his amazing group of contributors.
The instructions provided by Nginx Proxy Manager sufficiently show how to get it up and running as a stack with MySQL. However it omits specifically how to use the SQLite option even though NPM supports it and includes SQLite3 in it's Docker image. Sure using MySQL as a database is probably a good idea for a real webserver. However, in cases where say home users use NPM to provide SSL reverse proxies for services such as Plex, Sonarr, Radarr, etc, using MySQL seems like overkill. Especially if you take into account the NPM users on Raspberry Pi running off an SD Card. I'm one of those users. NPM is vastly faster using SQLite on Raspberry Pi than it is with MySQL.
The above docker-compose file can be downloaded and used to install NPM with SQLite support. It can take awhile for it start up on first run with either MySQL or SQLite. Be patient. If your unsure I'd recommend checking the logs via Portainer or command line. I once caught NPM retrying to connect to MySQL. I forgot I had my MySQL container and NPM container in separate Docker networks. Once I put both containers in the same network using Portainer the installation proceeded and NPM started.
mkdir =p $HOME/docker/nginx-proxy-manager
cd $HOME/docker/nginx-proxy-manager
wget https://gist.githubusercontent.com/slochewie/d0abe7a3f49f79b94a52522c2b6d5e59/raw/299e02f5c7c8243df46fbb5be543a53fdec11c2c/docker-compose.yml
docker-compose pull
docker-compose up -d