Skip to content

Commit

Permalink
fix(docker): add missing Docker volume mount configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
nunogoncalves03 committed Mar 7, 2024
1 parent 98d7987 commit 81f2220
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion backend/src/cron/monthlyDummyData.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ new CronJob(
"0 4 1 * *", // 4 am on the 1st day of every month
async () => {
try {
const bashCommand = `PGPASSWORD=${process.env.DB_PASSWORD} psql -h ${process.env.DB_DEMO_HOST} -U ${process.env.DB_USER} -d ${process.env.DB_NAME} -a -f ../../init-demo.sql`;
const scriptPath = __dirname + "/../../init-demo.sql";
const bashCommand = `PGPASSWORD=${process.env.DB_PASSWORD} psql -h ${process.env.DB_DEMO_HOST} -U ${process.env.DB_USER} -d ${process.env.DB_NAME} -a -f ${scriptPath}`;
const options = {
cwd: __dirname,
};
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ services:
restart: always
volumes:
- ./backend/init-demo.sql:/docker-entrypoint-initdb.d/init.sql
- ./backend/init-demo.sql:/usr/src/app/backend/init-demo.sql
- postgres-demo_data:/var/lib/postgresql/data
environment:
- TZ=Europe/Lisbon
Expand Down Expand Up @@ -56,6 +55,7 @@ services:
volumes:
- ./backend/src:/usr/src/app/backend/src
- ./backend/storage:/usr/src/app/backend/storage
- ./backend/init-demo.sql:/usr/src/app/backend/init-demo.sql
- backend_storage:/var/lib/hs-tms/storage
environment:
- TZ=Europe/Lisbon
Expand Down

0 comments on commit 81f2220

Please sign in to comment.