further to the above, i was able to get postgres r...
# docker
j
further to the above, i was able to get postgres running with this modified
docker-compose.yml
file :)
Copy code
version: '3.1'
services:
  meltano:
    image: meltano/meltano
    working_dir: /project
    volumes:
    - ./:/project
    ports:
    - '5000:5000'
    - '5010:5010'
    depends_on:
        - warehouse_db
    environment:
      POSTGRES_DB: warehouse
      POSTGRES_PASSWORD: warehouse
      POSTGRES_USER: warehouse
      TAP_PG_DATABASE: warehouse
      TAP_PG_ADDRESS: warehouse_db
      TAP_PG_PORT: 5432
      TAP_PG_USERNAME: warehouse
      TAP_PG_PASSWORD: warehouse
      PG_DATABASE: warehouse
      PG_PASSWORD: warehouse
      PG_USERNAME: warehouse
      PG_ADDRESS: warehouse_db
      PG_PORT: 5432
      PG_SCHEMA: 'tap_postgres'
  warehouse_db:
    image: postgres:11
    environment:
      POSTGRES_DB: warehouse
      POSTGRES_PASSWORD: warehouse
      POSTGRES_USER: warehouse
    ports:
    - '5502:5432'
Note that : a) meltano connects to the internal port 5432 (not 5502) of the warehouse_db container b) if you want to inspect the warehouse_db with an external tool (I use Postico for Mac) then connect to localhost:5502
m
I think the
meltano
service has too many env variables set, such as : I think these are only used by the
postgres:11
image, hence they are properly defined in the
warehouse_db
service.
Copy code
POSTGRES_DB: warehouse
POSTGRES_PASSWORD: warehouse
POSTGRES_USER: warehouse
Unless you want to extract data from your warehouse, these are not needed.
Copy code
TAP_PG_DATABASE: warehouse
TAP_PG_ADDRESS: warehouse_db
TAP_PG_PORT: 5432
TAP_PG_USERNAME: warehouse
TAP_PG_PASSWORD: warehouse
As per https://www.meltano.com/docs/environment-variables.html#system-database, you should define `
Copy code
MELTANO_DATABASE_URI=<postgresql://warehouse>:warehouse@warehouse_db:5432/warehouse