diff --git a/backend/cmd/db/insert_user_answers.go b/backend/cmd/db/insert_user_answers.go index 65505e3..08be5f3 100644 --- a/backend/cmd/db/insert_user_answers.go +++ b/backend/cmd/db/insert_user_answers.go @@ -45,7 +45,7 @@ func InsertUserAnswers(respondentId int, allAnswers string) (error) { } // Write answers to backup-file - file, err := os.OpenFile("cmd/db/backups/answer_backup.csv", os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0600) + file, err := os.OpenFile("cmd/db/backups/answer_backup.csv", os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0777) if err != nil { fmt.Println(err) } diff --git a/backend/docker-compose.yml b/backend/docker-compose.yml index 1af952a..e0ac0bf 100644 --- a/backend/docker-compose.yml +++ b/backend/docker-compose.yml @@ -16,6 +16,10 @@ services: context: . dockerfile: Dockerfile image: helseveileder + volumes: + - ./cmd/db/backups/answer_backup.csv + - ./cmd/db/backups/bugreport_backup.csv + - ./cmd/db/backups/evaluation_backup.csv depends_on: - postgres nginx: