version: '3'

services:
  web:
    build: .
    ports:
      - "5000:80"

version: '3'

services:
  web:
    build: .
    ports:
      - "5000:80"
    volumes:
      - .:/app

Add local code as a volume in compose config
Add local code as a volume in compose config
