Docker is confusing me. I'm trying to setup multiple sites on my remote server

Hi all

I'm really trying not to give up on Docker as I hear its the must tool to use but I think it's laughing at me.

I am trying to create multiple sites locally and then push to my remote server once done. Docker seems like the best tool to help with this but I am finding it hard at the moment. I plan on using Nuxt as the frontend for the sites and Directus as the backend which will be on a sub-domain.

I'm unable to get Nuxt working at the moment without some kind of unhealthy error so I have skipped this for now. I have a container for mysql and a container for nginx which I intend on using with multiple sites. I then plan to have a container for each site which will hold the directory for /frontend (nuxt) and backend (directus).

I thought I had this all sorted after days and days or playing about but as soon as I try to add a second website to my domain, it's broken. I thought I just needed to duplicate my nginx .conf file for the domain and sub-domain, change the port numbers, change the domains to match but nope, I'm now getting a conflicting error.

What is the correct way to set this up?

1 x container for Mysql
1x container for Nginx
1x container for each website
All connected using Network: app-network