• jogai_san@lemmy.worldOP
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    27 days ago

    It seems there is a misunderstanding. To be clear, this is what I mean:

    ┌───────────────────────┐    
    │ Browser               │    
    └───────────────────────┘    
         ▲                       
         │ port 443 open         
         │                       
         │                       
    ┌────┼──────────────────┐    
    │ Proxy (traefik)       │    
    └───────────────────────┘    
         ▲                       
         │                       
         │ web port open to proxy
         │                       
         │                       
    ┌────┼──────────────────┐    
    │ DBgate (in docker)    │    
    └───────────────────────┘    
         ▲                       
         │                       
         │                       
         │                       
    ┌────┼──────────────────┐    
    │ Database              │    
    └───────────────────────┘    
    

    This way DBgate serves the web app to the browser, but also acts as a ‘backend’ which connects to the database. This way my databases are not exposed to the web, only the proxy is, which handles domain name routing and http traffic.