Yep, I've made sure to change everything to match for what I need for this container. I've got many other applications running behind SWAG so I'm pretty familiar with how it works.
Also, I initially did follow a spaceinvaderone video when I initially setup my reverse proxy (before switching to SWAG) so just like you mentioned I have a "proxynet" network that I've assigned my containers to. I included a screenshot showing that I have my "crafty" container running on the proxynet along with the other applications I'm hosting.
To answer your question about the error message: it seems to be directly from SWAG as I'm not getting a DNS resolution error, it's specifically a 502 error from nginx. I've included a screenshot of that as well.
As for my config, I decided to try out your example and match it to my config:
server {
listen 443 ssl;
listen [::]:443 ssl;
# "minecraft" is the name I have configured for my DNS CNAME
server_name minecraft.*;
include /config/nginx/ssl.conf;
client_max_body_size 0;
location / {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
# I've changed the container name to "crafty"
set $upstream_app crafty;
# And also changed the "port 2" to 8001 as the default has a conflict
set $upstream_port 8001;
set $upstream_proto https;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
proxy_max_temp_file_size 2048m;
}
}