Move password related env variables to docker compose .env file

This commit is contained in:
Christoph Lienhard 2020-05-31 13:47:56 +02:00
parent 2068dfd1af
commit 5e69a5f31e
3 changed files with 6 additions and 5 deletions

4
.env
View file

@ -1,5 +1,7 @@
COMPOSE_FILE=docker-compose.dev.yml
COMPOSE_PROJECT_NAME=candymat
#Postgraphile vars
# Backend vars
POSTGRES_PASSWORD=postgres!dev
DATABASE_URL=postgres://candymat_postgraphile:postgres!dev@postgres:5432/candymat_db
JWT_SECRET=asdfasdfasdf

View file

@ -1,8 +1,5 @@
# Postgres database setup
POSTGRES_PASSWORD=postgres!dev
POSTGRES_USER=candymat_postgraphile
# Password is handled by docker-compose
POSTGRES_DB=candymat_db
POSTGRES_SCHEMA=candymat_data
# postgraphile setup
JWT_SECRET=asdfasdfasdf

View file

@ -28,6 +28,8 @@ services:
build:
dockerfile: ./Dockerfile
context: ./backend/
environment:
- "POSTGRES_PASSWORD=${POSTGRES_PASSWORD}"
env_file: ./backend/backend.env
ports:
- "5432:5432"