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

【bug】Environment variables do not take effect #1121

Closed
wintsa123 opened this issue Apr 25, 2024 · 6 comments
Closed

【bug】Environment variables do not take effect #1121

wintsa123 opened this issue Apr 25, 2024 · 6 comments

Comments

@wintsa123
Copy link

i try to set 'e - LANGS=zh_CN' in docker,but it not show zh_CN default.

and i try to change setting.yml,, "defaultLocale: 'zh_CN' ",go on restart,and it not show zh_CN default.

@Frooodle
Copy link
Member

LANGS=zh_CN is not for default but for fonts

It's default locale which is for the default Lang
We have a fix for default Lang coming I believe

@wintsa123
Copy link
Author

LANGS=zh_CN 不是默认值,而是字体

这是默认语言环境,适用于默认 Lang 我相信我们对默认 Lang 进行了修复

I hope my Stirling will open in Chinese by default. I have set the environment to LANGS=zh-CN in Docker, and set defaultLocales: zh-CN in the settings. yml file of config. I have also restarted and refreshed the browser cache, but unfortunately it did not take effect

@gepcel
Copy link

gepcel commented Apr 25, 2024

It's not zh_CN, but zh-CN. So settings.yml should be like:

system:
  defaultLocale: 'zh-CN' 

@wintsa123
Copy link
Author

zh-CN

fine, i try to change
image

I opened pdftool after clearing the cache and it's still default English。
Also I would like to use the nginx proxy but the subdomain can't open the page

@zallaevan
Copy link
Contributor

zh-CN

fine, i try to change image

I opened pdftool after clearing the cache and it's still default English. Also, I would like to use the nginx proxy but the subdomain can't open the page

Maybe, after changing the configuration, try to restart the container on Docker via sudo docker restart [container].
Additionally, you can test if it works by setting on your Docker Compose file or via the command the environmental variable SYSTEM_DEFAULTLOCALE equal to zh-CN.

Regarding the setup of the Nginx Reverse Proxy, I am not very versed in that regard, but I might assume you should add something like this to your active site configuration:

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name stirling.*;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;

    location / {
        include /config/nginx/proxy.conf;
        resolver 127.0.0.11 valid=30s;
        set $upstream_app stirling-pdf;
        set $upstream_port 8080;
        set $upstream_proto http;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;
    }
}

All credit goes to this guy here on Reddit, cheers mate!

祝你好运

@wintsa123
Copy link
Author

I found that both problems are caused by caching

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

4 participants