#version: '3'

# add host 
# with static wan ip 217.160.255.254

# run container over podman
#podman compose up -d --build

#run container over docker
#docker compose up -d --build

services:
    openwrt-x86-backfire:
        stdin_open: true
        tty: true
        ports: 
            - 0.0.0.0:22:22
        container_name: openwrtbackfire
        runtime: io.containerd.runc.v2
        isolation: default
        environment:
            - TZ=CET-1
            - NETWORK_IF=virbr0
            - QEMU_CPU=1
            - QEMU_RAM=4
            #- QEMU_ARCH=${QEMU_ARCH:-cortex-a72}
            - QEMU_ARCH=${cortex-m0plus}
        #blkio_config:
        #    weight: 100
        #cpu_shares: 1024
        #cpu_quota: "1000"
        #cpu_period: "1000"
        network_mode: none
        #hostname: demogitjava.ddns.net
        #extra_hosts:
        #    - demogitjava.ddns.net:217.160.255.254
        platform: linux/amd64
        restart: unless-stopped
        cap_add:
            - NET_ADMIN
            - SYS_ADMIN
            - SYS_TIME
        
        privileged: false
        image: jgsoftwares/openwrt-x86-backfire:gcore
        #deploy:
        #    mode: global
        #    resources:
        #        limits:
        #          #cpus: '2'
        #          memory: 2048M
        #        reservations:
        #          #cpus: '0.25'
        #          memory: 512M
        command: /bin/ash


