What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

I'd like to have multiple B2C shops I can use to experiment. Is there a way to separate the volumes

U03SN9552JC
U03SN9552JC Posts: 78 πŸ§‘πŸ»β€πŸš€ - Cadet

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?

Comments

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    Yes, please use different namespace in deploy files.

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    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.

  • U03SN9552JC
    U03SN9552JC Posts: 78 πŸ§‘πŸ»β€πŸš€ - Cadet

    Thats what I wanted to know, super! Thank you!

  • U02RP0WD8SE
    U02RP0WD8SE Posts: 14 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited September 2022

    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.

  • U03SN9552JC
    U03SN9552JC Posts: 78 πŸ§‘πŸ»β€πŸš€ - Cadet

    Where would you set the domain name for each shop, just in the configuration?

  • U02RP0WD8SE
    U02RP0WD8SE Posts: 14 πŸ§‘πŸ»β€πŸš€ - Cadet

    deploy.yml

  • U02RP0WD8SE
    U02RP0WD8SE Posts: 14 πŸ§‘πŸ»β€πŸš€ - Cadet

    the setup is like this:

  • U02RP0WD8SE
    U02RP0WD8SE Posts: 14 πŸ§‘πŸ»β€πŸš€ - Cadet

    nginx ingress ('proxy' in the chart) is like (just for the domain name 'b2c.localhost'):

    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;
        }
    }
    
  • U03SN9552JC
    U03SN9552JC Posts: 78 πŸ§‘πŸ»β€πŸš€ - Cadet

    Nice! I'll give it a go. Thats pretty good work Stephan