db:
  image: postgres
  environment:
    POSTGRES_USER: "postgres"
    POSTGRES_PASSWORD: "mysecretpassword"
  ports:
    - "5433:5432"
web:
  build: .
  volumes:
    - .:/app
  ports:
    - "3000:3000"
  links:
    - db
  environment:
    POSTGRES_HOST: "db"
    POSTGRES_USER: "postgres"
    POSTGRES_PASSWORD: "mysecretpassword"
    DB_NAME: "postgres"

db:
  image: postgres
  environment:
    POSTGRES_USER: "postgres"
    POSTGRES_PASSWORD: "mysecretpassword"
web:
  build: .
  volumes:
    - .:/app
  ports:
    - "3000:3000"
  links:
    - db
  environment:
    POSTGRES_HOST: "db"
    POSTGRES_USER: "postgres"
    POSTGRES_PASSWORD: "mysecretpassword"
    DB_NAME: "postgres"

Remove unnecessary port mapping for Postgres
Remove unnecessary port mapping for Postgres
