Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save mnjenga2/099e610c1726b5b90b5264f38a99a242 to your computer and use it in GitHub Desktop.

Select an option

Save mnjenga2/099e610c1726b5b90b5264f38a99a242 to your computer and use it in GitHub Desktop.

Revisions

  1. @eliashussary eliashussary created this gist Dec 11, 2018.
    34 changes: 34 additions & 0 deletions metabase-postgres.docker-compose.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    version: "3"
    services:

    postgres-db:
    image: postgres
    restart: always
    ports:
    - 5432:5432
    environment:
    POSTGRES_PASSWORD: postgres
    PGDATA: /var/lib/postgresql/data
    volumes:
    # declare your mount volume /host/dir:/container/dir
    - /home/app/pgdata:/var/lib/postgresql/data

    metabase-app:
    image: metabase/metabase
    restart: always
    ports:
    - 3001:3000
    volumes:
    # declare your mount volume /host/dir:/container/dir
    - /home/app/metabase-data:/metabase-data
    environment:
    MB_DB_TYPE: postgres
    MB_DB_DBNAME: metabase
    MB_DB_PORT: 5432
    MB_DB_USER: metabase
    MB_DB_PASS: postgres
    MB_DB_HOST: postgres-db
    depends_on:
    - postgres-db
    links:
    - postgres-db