version: "3.7" services: db: image: postgres:13-alpine restart: unless-stopped volumes: - data:/var/lib/postgresql/data env_file: ./.env #Here we are using the already existing .env file ports: - "5432:5432" pga: image: dpage/pgadmin4 environment: PGADMIN_DEFAULT_EMAIL: root@localhost.localdomain PGADMIN_DEFAULT_PASSWORD: secret PGADMIN_DISABLE_POSTFIX: "true" PGADMIN_CONFIG_SERVER_MODE: "False" network_mode: host volumes: - pgadmin:/var/lib/pgadmin volumes: data: pgadmin: