🔒 create .env file for dockercompose

Signed-off-by: Sindre Kjelsrud <kjelsrudsindre@gmail.com>
This commit is contained in:
Sindre Kjelsrud 2024-05-02 16:33:15 +02:00
parent f08bd430f3
commit 3885501b61
Signed by untrusted user who does not match committer: sidski
GPG key ID: D2BBDF3EDE6BA9A6
2 changed files with 8 additions and 8 deletions

4
backend/.env.example Normal file
View file

@ -0,0 +1,4 @@
POSTGRES_PASSWORD=supersafepassword
POSTGRES_USER=superman
POSTGRES_HOST=postgres
POSTGRES_DB=supercooldbname

View file

@ -7,19 +7,15 @@ services:
- 5432:5432 - 5432:5432
volumes: volumes:
- ~/apps/postgres:/var/lib/postgresql/data - ~/apps/postgres:/var/lib/postgresql/data
environment: env_file:
- POSTGRES_PASSWORD=helse123 - .env
- POSTGRES_USER=admin
- POSTGRES_DB=helseveileder
ginapi: ginapi:
build: build:
context: . context: .
dockerfile: Dockerfile dockerfile: Dockerfile
image: helseveileder image: helseveileder
volumes: ports:
- ${HOME}/helseveileder/backend/cmd/db/backups/answer_backup.csv - 8080:8080
- ${HOME}/helseveileder/backend/cmd/db/backups/bugreport_backup.csv
- ${HOME}/helseveileder/backend/cmd/db/backups/evaluation_backup.csv
depends_on: depends_on:
- postgres - postgres
nginx: nginx: