version: "3.9" services: db: build: . env_file: .env volumes: - ./dbdata:/var/lib/postgresql/data ports: - 5432:5432 volumes: dbdata: