Skip to content

Commit

Permalink
chore: Grant privileges to user to connect from Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
aridanemartin committed Jul 2, 2024
1 parent b7cf301 commit 3ad57a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,9 @@ sudo usermod -aG docker $USER

CONNECT TO INSTANCE
`ssh -i "gatos-sin-hogar.pem" ubuntu@ec2-18-133-76-236.eu-west-2.compute.amazonaws.com`

GRANT PRIVILEGES TO THE USER TO CONNECT FROM DOCKER

`docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' my-node-app-container`

You need to add privileges to an user to connect to this specific port of docker container.
2 changes: 1 addition & 1 deletion db/config.production.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const config = {
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: 'root',
user: 'admin',
password: process.env.DB_PASSWORD,
database: 'gatos_sin_hogar'
};

0 comments on commit 3ad57a1

Please sign in to comment.