john_scott
02/04/2020, 2:11 AMdocker-compose.yml
file :)
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:5502micael_bergeron
02/05/2020, 2:29 PMmeltano
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.
POSTGRES_DB: warehouse
POSTGRES_PASSWORD: warehouse
POSTGRES_USER: warehouse
Unless you want to extract data from your warehouse, these are not needed.
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 `
MELTANO_DATABASE_URI=<postgresql://warehouse>:warehouse@warehouse_db:5432/warehouse