🔒 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
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: