From f320f85d0abf29c6db7b93772af49e8e61b43ddf Mon Sep 17 00:00:00 2001 From: haraldnilsen Date: Sun, 14 Jan 2024 22:15:35 +0100 Subject: [PATCH] :whale: updated docker-compose Co-authored-by: Sindre Kjelsrud --- backend/cmd/db/insert_user_answers.go | 2 +- backend/docker-compose.yml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) 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: