services:
  databse:
    image: postgres:latest
    restart: always
    environment:
      POSTGRES_USER: admin
      POSTGRES_PASSWORD: admin
      POSTGRES_DB: zprox
    ports:
      - "5432:5432" #maps host's port 5432 to the container's port 5432.
    volumes:
      - ./postgres_data:/var/lib/postgresql/data/
    networks:
      database:
        ipv4_address: 10.100.0.1

networks:
  database:
    driver: bridge
    ipam:
      config:
        - subnet: 10.100.0.0/24
          gateway: 10.100.0.254
