flask app service can't connect to postgres service within docker-compose
I am trying to run flask, postgres and nginx services with following docker-compose: version: '3.6' services: postgres: image: postgres:10.5 container_name: postgres hostname: postgres user: postgres ports: - "5432:5432" networks: - db-tier environment: CUSTOM_CONFIG: /etc/postgres/postgresql.conf volumes: - ./postgres/sql/create_tables.sql:/docker-entrypoint-initdb.d/create_tables.sql - ./postgres/postgresql.conf:/etc/postgres/postgresql.conf command:…