Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report issues related to configurations on running Storefront Watcher #8

Open
MinhVu2711 opened this issue May 2, 2024 · 1 comment

Comments

@MinhVu2711
Copy link

MinhVu2711 commented May 2, 2024

proxy_set_header Host localhost;

Hi @boxblinkracer,
If I put this line in the shop-1.conf the watcher won't work, so I remove that line by following the configuration from the essentials folder instead of dev folder and it works fine.

It would be better if you could update the document on the dockerware website as well ;)

@MinhVu2711
Copy link
Author

btw, may I ask if I change the proxy service port from "80:80" to "8080:80"

version: "3.8"

services:

    proxy:
        container_name: proxy
        image: dockware/proxy:latest
        ports:
            - "80:80"          # Change to "8080:80"
            - "8888:8888"
            - "9999:9999"
            - "9998:9998"
        depends_on:
            - shop1
        volumes:
            - "./proxy/shop-1.conf:/etc/nginx/conf.d/shop-1.conf"

    shop1:
      image: dockware/dev:latest
      container_name: shop1
      ports:
         - "3308:3306"
         - "2222:22"
      volumes:
         - "db_volume:/var/lib/mysql"
         - "shop_volume:/var/www/html"
      environment:
         # default = 0, recommended to be OFF for frontend devs
         - XDEBUG_ENABLED=1
         # default = latest PHP, optional = specific version
         - PHP_VERSION=8.2

....

Then what should I change for the .env and shop-1.conf files as well as the url value from the sales_channel_domain table so that my app can work well?


shop-1.conf:

server {
    listen        80;
    server_name   shop1.shopware.com;

    location / {
        proxy_pass http://shop1;
        proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
    }
}

server {
    listen                    8888 ssl;
    server_name               shop1.shopware.com;

    ssl_certificate /etc/nginx/ssl/selfsigned.crt;
    ssl_certificate_key /etc/nginx/ssl/selfsigned.key;

    location /admin {
        proxy_pass            http://shop1:8888;
        proxy_next_upstream   error timeout invalid_header http_500 http_502 http_503 http_504;
    }
    location /static {
        proxy_pass            http://shop1:8888;
        proxy_next_upstream   error timeout invalid_header http_500 http_502 http_503 http_504;
    }
    location /api {
        proxy_pass            http://shop1;
        proxy_next_upstream   error timeout invalid_header http_500 http_502 http_503 http_504;
    }
    location / {
        proxy_pass            http://shop1:8888;
        proxy_next_upstream   error timeout invalid_header http_500 http_502 http_503 http_504;
    }
}

server {
    listen                    9998;
    server_name               shop1.shopware.com;

    location / {
        proxy_pass            http://shop1:9998;
        proxy_next_upstream   error timeout invalid_header http_500 http_502 http_503 http_504;
    }
}

.env:

###> shopware/storefront ###
STOREFRONT_PROXY_URL=http://localhost
SHOPWARE_HTTP_CACHE_ENABLED=1
SHOPWARE_HTTP_DEFAULT_TTL=7200
###< shopware/storefront ###
APP_ENV=dev
APP_URL=http://shop1.shopware.com
DATABASE_URL=mysql://root:[email protected]:3306/shopware
MAILER_DSN=smtp://127.0.0.1:1025

/etc/hosts file:

127.0.0.1. shop1.shopware.com

@MinhVu2711 MinhVu2711 reopened this May 2, 2024
@MinhVu2711 MinhVu2711 changed the title Report issues related to Storefront Watcher Report issues related to configurations on running Storefront Watcher May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant