Connect to psql instance running in a docker container : I have a simple flask application running with an instance of psql using docker-compose.

How can I connect to my psql instance?

Here is my docker-compose file:

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-html -->

    version: '2'
    services:
        web:
            build: .
            command: python manage.py runserver
            volumes:
                - .:/app
            ports:
                - 5000:5000
            links:
                - postgres
            env_file:
                - .env
        postgres:
            image: postgres:9.4
            ports:
                - 5432:5432
            environment:
                POSTGRES_PASSWORD: user
                POSTGRES_USER: password
                POSTGRES_DB: postgresdb


<!-- end snippet -->

     
