~robertgzr/greenfy

38a1003d308c827e4c4bce9274261f4d25b618e2 — Robert Günzler 1 year, 10 months ago f6d1294 master
docker: allow setting secrets via env vars
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: {}