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

配置文件不生效 #453

Open
syanpun opened this issue Apr 11, 2024 · 2 comments
Open

配置文件不生效 #453

syanpun opened this issue Apr 11, 2024 · 2 comments

Comments

@syanpun
Copy link

syanpun commented Apr 11, 2024

k8s部署,把config.yml挂载到/usr/local/next-terminal/config.yml或者/etc/next-terminal/config.yml均不生效,如下面截图,配置文件指定使用mysql,启动日志输出使用sqlite

image image

config.yml:

debug: false
demo: false
db: mysql
mysql:
  hostname: mysql
  port: 3306
  username: xxx
  password: xxx
  database: next-terminal
guacd:
  hostname: guacd
  port: 4822
  recording: /usr/local/next-terminal/data/recording
  driver: /usr/local/next-terminal/data/driver
sshd:
  enable: true
  addr: 0.0.0.0:8089
  key: /usr/local/next-terminal/ssh/id_rsa

只能通过环境变量的方式指定mysql相关配置

@syanpun
Copy link
Author

syanpun commented Apr 11, 2024

貌似只是配置文件中部分字段不生效,配置文件中指定的mysql用户名密码在通过环境变量指定使用mysql后是能读取到的

@dushixiang
Copy link
Owner

k8s部署,把config.yml挂载到/usr/local/next-terminal/config.yml或者/etc/next-terminal/config.yml均不生效,如下面截图,配置文件指定使用mysql,启动日志输出使用sqlite

image image
config.yml:

debug: false
demo: false
db: mysql
mysql:
  hostname: mysql
  port: 3306
  username: xxx
  password: xxx
  database: next-terminal
guacd:
  hostname: guacd
  port: 4822
  recording: /usr/local/next-terminal/data/recording
  driver: /usr/local/next-terminal/data/driver
sshd:
  enable: true
  addr: 0.0.0.0:8089
  key: /usr/local/next-terminal/ssh/id_rsa

只能通过环境变量的方式指定mysql相关配置

环境变量的优先级比配置文件要高,容器打包的时候内置了一些环境变量,因此导致配置文件中的不生效。

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

2 participants