version: "3.9" services: postgres: image: postgres:15 container_name: recipes-postgres restart: unless-stopped environment: POSTGRES_USER: recipes_user POSTGRES_PASSWORD: recipes_password POSTGRES_DB: recipes_db ports: - "5432:5432" volumes: - pgdata:/var/lib/postgresql/data - ./schema.sql:/docker-entrypoint-initdb.d/schema.sql:ro pgadmin: image: dpage/pgadmin4:8 container_name: recipes-pgadmin restart: unless-stopped environment: PGADMIN_DEFAULT_EMAIL: admin@dvirlabs.com PGADMIN_DEFAULT_PASSWORD: Aa123456 ports: - "5050:80" depends_on: - postgres volumes: pgdata: