Skip to content

Commit

Permalink
removing some hardcoded env values
Browse files Browse the repository at this point in the history
  • Loading branch information
Angel Viera committed Feb 19, 2023
1 parent 8033917 commit 4267ac2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/grafana/datasources/datasource.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: 1
datasources:
- name: TimescaleDB
type: postgres
url: timescaledb:5432
url: ${POSTGRES_URL}:${POSTGRES_PORT}
database: ${POSTGRES_DB}
user: ${POSTGRES_USER}
secureJsonData:
Expand Down
10 changes: 5 additions & 5 deletions db-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ const { getAirData, getDevices, getDeviceIdList } = require("./awair-api.js");
const AIRDATA_TABLE_NAME = "awair_sensor_data";

// Define the connection parameters
// read from local .env file
const connectionParams = {
user: "postgres",
host: "timescaledb",
database: "postgres",
// read password from local .env file
user: process.env.POSTGRES_USER,
host: process.env.POSTGRES_URL,
database: process.env.POSTGRES_DB,
password: process.env.POSTGRES_PASSWORD,
port: 5432, // or the port number you specified when running the Docker container
port: process.env.POSTGRES_PORT, // or the port number you specified when running the Docker container
};


Expand Down

0 comments on commit 4267ac2

Please sign in to comment.