I'd like to have multiple B2C shops I can use to e...
# docker
h
I'd like to have multiple B2C shops I can use to experiment. Is there a way to separate the volumes so I don't over-write the data?
a
Yes, please use different
namespace
in deploy files.
🙌 1
Forgot to add that it's impossible to have multiple shops running simultaneously. But with different namespaces they won't interfere from images\volumes perspective.
🙍 1
h
Thats what I wanted to know, super! Thank you!
👍 1
a
It' also possible to have multiple shops running on top of the same docker engine. Just remove the gateways exposed ports, set each shop's domain name to sth like '*.shop-1.localhost', '.shop-2.localhost' and so on* and then put an ingress nginx in front of all your gateways.
h
Where would you set the domain name for each shop, just in the configuration?
a
deploy.yml
the setup is like this:
🙌 1
nginx ingress ('proxy' in the chart) is like (just for the domain name 'b2c.localhost'):
Copy code
upstream b2c {
    server b2c_gateway_1:80;
}

server {
    listen       80;
    listen  [::]:80;

    server_name *.b2c.localhost;

    location / {
        proxy_pass <http://b2c>;
        proxy_set_header Host $host;
    }
}


server {
    listen       80;
    listen  [::]:80;

    server_name b2c.localhost;

    location / {
        proxy_pass <http://b2c>;
        proxy_set_header Host $host;
    }
}
h
Nice! I'll give it a go. Thats pretty good work Stephan