version: '3.8' services: postgres: environment: POSTGRES_USER: postgres_staging POSTGRES_PASSWORD: postgres_staging_password POSTGRES_DB: postgres_staging ports: - "5433:5432" volumes: - postgres_data_staging:/var/lib/postgresql/data - ./config/postgres-staging.conf:/etc/postgresql/postgresql.conf command: postgres -c config_file=/etc/postgresql/postgresql.conf deploy: resources: limits: cpus: '1' memory: 1G pgadmin: environment: PGADMIN_DEFAULT_EMAIL: staging@example.com PGADMIN_DEFAULT_PASSWORD: pgadmin_staging_password ports: - "5051:80" volumes: - pgadmin_data_staging:/var/lib/pgadmin deploy: resources: limits: cpus: '0.5' memory: 512M volumes: postgres_data_staging: name: postgres_data_staging pgadmin_data_staging: name: pgadmin_data_staging networks: postgres_network: name: postgres_network_staging