1 files changed, 9 insertions(+), 7 deletions(-)
M compose.yml
M compose.yml => compose.yml +9 -7
@@ 12,26 12,28 @@ services:
depends_on:
- db
environment:
- DATABASE_URL: ecto://postgres:postgres@db/greenfy
- SECRET_KEY_BASE: uQdZOlmfWQveVwHmQG0a695zWaUUtoH1wbtW2N/TJr3rUOUqKqhlpgsIs8tGgjO2
- PHX_HOST: example.com
+ DATABASE_URL: ecto://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db/greenfy
+ SECRET_KEY_BASE: ${SECRET_KEY_BASE:-uQdZOlmfWQveVwHmQG0a695zWaUUtoH1wbtW2N/TJr3rUOUqKqhlpgsIs8tGgjO2}
+ PHX_HOST: ${PHX_HOST:-localhost}
db:
image: docker.io/library/postgres:14-alpine
restart: always
environment:
- POSTGRES_USER: postgres
- POSTGRES_PASSWORD: postgres
+ POSTGRES_USER: ${POSTGRES_USER:-postgres}
+ POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
PGDATA: /pgdata
ports:
- "5432:5432"
networks:
- app
- tmpfs:
- - /pgdata
# volumes:
# - "pgdata:/pgdata"
+ # this makes db ephemeral
+ tmpfs:
+ - /pgdata
+
# volumes:
# pgdata: {}