From 3885501b61990da0b1ee58f7e98a7e0244ec77f8 Mon Sep 17 00:00:00 2001 From: Sindre Kjelsrud Date: Thu, 2 May 2024 16:33:15 +0200 Subject: [PATCH] :lock: create .env file for dockercompose Signed-off-by: Sindre Kjelsrud --- backend/.env.example | 4 ++++ backend/docker-compose.yml | 12 ++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 backend/.env.example diff --git a/backend/.env.example b/backend/.env.example new file mode 100644 index 0000000..ec0fabd --- /dev/null +++ b/backend/.env.example @@ -0,0 +1,4 @@ +POSTGRES_PASSWORD=supersafepassword +POSTGRES_USER=superman +POSTGRES_HOST=postgres +POSTGRES_DB=supercooldbname \ No newline at end of file diff --git a/backend/docker-compose.yml b/backend/docker-compose.yml index 01feb84..f1133c2 100644 --- a/backend/docker-compose.yml +++ b/backend/docker-compose.yml @@ -7,19 +7,15 @@ services: - 5432:5432 volumes: - ~/apps/postgres:/var/lib/postgresql/data - environment: - - POSTGRES_PASSWORD=helse123 - - POSTGRES_USER=admin - - POSTGRES_DB=helseveileder + env_file: + - .env ginapi: build: context: . dockerfile: Dockerfile image: helseveileder - volumes: - - ${HOME}/helseveileder/backend/cmd/db/backups/answer_backup.csv - - ${HOME}/helseveileder/backend/cmd/db/backups/bugreport_backup.csv - - ${HOME}/helseveileder/backend/cmd/db/backups/evaluation_backup.csv + ports: + - 8080:8080 depends_on: - postgres nginx: