Skip to content

Commit

Permalink
Feature: Add DB host and port as environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
aridanemartin committed Jul 2, 2024
1 parent 1ba87dd commit b7cf301
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ jobs:
sudo docker stop gatos-sin-hogar-backend || true
sudo docker rm gatos-sin-hogar-backend || true
sudo docker run -d --name gatos-sin-hogar-backend -p 80:7000 \
--env PORT=${{ secrets.PORT }} \
--env NODE_ENV=${{ secrets.NODE_ENV }} \
--env PORT=${{ secrets.PORT }} \
--env DB_PORT=${{ secrets.DB_PORT }} \
--env DB_HOST=${{ secrets.DB_HOST }} \
--env AWS_BUCKET_NAME=${{ secrets.AWS_BUCKET_NAME }} \
--env AWS_REGION=${{ secrets.AWS_REGION }} \
--env AWS_ACCESS_KEY_ID=${{ secrets.AWS_BUCKET_NAME }} \
Expand Down
4 changes: 2 additions & 2 deletions db/config.production.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const config = {
host: 'localhost',
port: 3306,
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: 'root',
password: process.env.DB_PASSWORD,
database: 'gatos_sin_hogar'
Expand Down

0 comments on commit b7cf301

Please sign in to comment.