services:

  beedb:
    image: postgres:16
    restart: always
    environment:
      - POSTGRES_DB=postgres
      - POSTGRES_PASSWORD=ZpSwWNafyy9GhY2gzHw
      - POSTGRES_USER=1gtT0sf8klB9lDbYZD9
    volumes:
      - /4server/data/postgres/data/:/var/lib/postgresql/data/
      - /4server/data/postgres/pg_backup/:/BACKUP/
      - /4server/data/postgres/etc/:/etc/postgresql/16/main/

    networks:
      4projects:
        ipv4_address: 10.5.0.200

  traefik:
    image: docker.io/library/traefik:3.6
    container_name: traefik
    ports:
      - 80:80
      - 443:443
    volumes:
      - /run/docker.sock:/run/docker.sock:ro
      - /4server/data/traefik/etc:/etc/traefik
      - /4server/data/traefik/certs:/certs
      - /4server/data/log/traefik-logs:/var/log/traefik
    networks:
      - 4projects
    restart: unless-stopped

networks:
  4projects:
    driver: bridge
    ipam:
      config:
        - subnet: 10.5.0.0/16
          gateway: 10.5.0.1
          ip_range: 10.5.0.0/26

