version: '3'

# debug image 
# this docker compose starts only the landingapge - debug image
# network 172.17.0.0 is required
# runs with derbdb

# commands 
# docker compose build
# docker compose up



services:
    de_derby:
    image: jgsoftwares/oraclelinux_openjdk_derbydb:1.8qemu
    container_name: de_derby
    platform: linux/amd64
    runtime: io.containerd.runc.v2
    isolation: default
    ports:
      - "0.0.0.0:1527:1527"
    networks:
     172.17.0.0:
        ipv4_address: 172.17.0.2
    devices: 
       - "/dev/kvm" 
    environment:
      - TZ=Europe/Berlin
      - NTP_SERVERS=2.rhel.pool.ntp.org
      - NETWORK_IF=eth0 
      - QEMU_PORTS='1527'
      - QEMU_CPU=2
      - QEMU_RAM=1024 
    dns:
      - 95.85.95.85
      - 2.56.220.2
    cap_add:
      - NET_ADMIN
      - SYS_ADMIN
networks:
  172.17.0.0:
    external: true
    
    oraclelinux_openjdk_landingpage_debug:
        stdin_open: true
        tty: true
        ports:
            - 0.0.0.0:80:80
            - 0.0.0.0:5005:5005
        environment:
            - JAVA_DEBUG=true
            - TZ=Europe/Berlin
            - NTP_SERVER=2.rhel.pool.ntp.org
            - NETWORK_IF=eth0
            - QEMU_PORTS='80'
            - QEMU_PORTS='5005'
            - QEMU_CPU=2
            - QEMU_RAM=1024
        blkio_config:
            weight: 100
        extra_hosts:
            - demogitjava.ddns.net:217.160.255.254
        runtime: io.containerd.runc.v2
        container_name: oraclelinuxlandingpagedebug
        network_mode: host
        hostname: demogitjava.ddns.net
        volumes:
            - /etc/resolv.conf:/etc/resolv.conf
        restart: unless-stopped
        cap_add:
            - NET_ADMIN
        platform: linux/amd64
        cpu_quota: "2000"
        cpu_period: "2000"
        cpu_shares: 1024
        isolation: default
        devices:
            - /dev/kvm
        image: jgsoftwares/oraclelinux_openjdk_landingpage:debug
        command: /bin/bash /root/runlandingpage.sh 