version: "3.5" services: postgres: container_name: postgres_container image: postgres environment: POSTGRES_USER: chloe POSTGRES_PASSWORD: chloeadmin PGDATA: /data/postgres volumes: - postgres:/data/postgres ports: - "5432:5432" networks: - postgres restart: unless-stopped pgadmin: container_name: pgadmin_container image: dpage/pgadmin4 environment: PGADMIN_DEFAULT_EMAIL: chloe PGADMIN_DEFAULT_PASSWORD: chloeadmin PGADMIN_CONFIG_SERVER_MODE: "False" volumes: - pgadmin:/var/lib/pgadmin ports: - "5050:5050" networks: - postgres restart: unless-stopped networks: postgres: driver: bridge volumes: postgres: pgadmin: