Closed kenzo2013 closed 2 months ago
As I see, there is an invalid user/password on your host, you can check it after logging in by SSH:
docker ps -a
docker logs <pg-container-hash>
docker exec -it --user root <pg-container-hash> psql
and fix the role.
I've found it easier to add PG user via production.sql
:
CREATE ROLE deployer WITH SUPERUSER LOGIN PASSWORD 'k978_mJurHk7';
CREATE DATABASE kamal_blog_production;
GRANT CREATE ON SCHEMA public TO deployer;
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO deployer;
GRANT ALL PRIVILEGES ON DATABASE kamal_blog_production to deployer;
In production env, you can then manually change the password, or install DB dump manually in the same way by SSH/Docker.
Also, there is the full process of Rails project deployment with Kamal https://github.com/abratashov/kamal-blog/blob/main/doc/install_prod.md
Hi guys,
I have a problem connecting to my database after playing kamal setup.
This my deploy.yml:
This is error:
This my database.yml:
I added all variables in .env and runned
kamal env push
What is going wrong? Please help