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

Kaigara does not support postgresql #77

Open
ianeinser opened this issue Jul 22, 2022 · 1 comment
Open

Kaigara does not support postgresql #77

ianeinser opened this issue Jul 22, 2022 · 1 comment

Comments

@ianeinser
Copy link

ianeinser commented Jul 22, 2022

Hi,

i would like to confirm if Kaigara can support postgres or not because i keep getting these errors even though i use the env example

[Kaigara] 2022/07/22 02:31:22 Connected to redis
[Kaigara] 2022/07/22 02:31:22 Starting command: ./bin/sonic [serve]
[Kaigara] 2022/07/22 02:31:22 Publishing on log.sonic.stdout and log.sonic.stderr
[Kaigara] 2022/07/22 02:31:22 Reached EOF on STDIN
[mysql] 2022/07/22 02:32:22 packets.go:36: unexpected EOF
[mysql] 2022/07/22 02:33:22 packets.go:36: unexpected EOF
[mysql] 2022/07/22 02:34:22 packets.go:36: unexpected EOF

2022/07/22 02:34:22 /go/pkg/mod/github.com/openware/pkg/d2022/07/22 02:34:22 driver: bad connection
[email protected]/database.go:37
[error] failed to initialize database, got error driver: bad connection
[Kaigara] 2022/07/22 02:34:22 exit status 1

do you have any idea how to enable postgres?

this is how i set kaigara env in kaisave.rake directly

desc "Save #{SECRETS_PATH} contents to Vault"
task :save do
ENV['KAIGARA_DEPLOYMENT_ID'] = @config['app']['name'].downcase
ENV['KAIGARA_VAULT_ADDR'] ||= 'http://127.0.0.1:8200'
ENV['KAIGARA_VAULT_TOKEN'] = @config['vault']['sonic_token']
ENV['KAIGARA_STORAGE_DRIVER'] = 'sql'
ENV['KAIGARA_DATABASE_DRIVER'] = 'postgres'

sh "./tmp/kaisave --filepath #{SECRETS_PATH}"

end

@xenirio
Copy link
Contributor

xenirio commented Aug 29, 2022

Hi @ianeinser,

Please make sure these env vars configured

# Supported SQL drivers are postgres and mysql
export KAIGARA_DATABASE_DRIVER=postgres
export KAIGARA_DATABASE_HOST=localhost
export KAIGARA_DATABASE_PORT=5432
export KAIGARA_DATABASE_USER=postgres
export KAIGARA_DATABASE_PASS=changeme
export KAIGARA_LOG_LEVEL=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants