services: db: image: postgres container_name: pgdb restart: always env_file: ./.env ports: - "5432:5432" volumes: - ./db_data:/var/lib/postgresql/data