Giter Site home page Giter Site logo

Comments (8)

muayyad-alsadi avatar muayyad-alsadi commented on July 17, 2024 1

please try latest dev branch now

from podman-compose.

muayyad-alsadi avatar muayyad-alsadi commented on July 17, 2024 1

I've pushed the test here

and it works fine.

from podman-compose.

muayyad-alsadi avatar muayyad-alsadi commented on July 17, 2024

Context? Composer file? Command?

from podman-compose.

yangm97 avatar yangm97 commented on July 17, 2024

Thanks for the prompt reply. I ran podman-compose up over the following compose file:

version: '3.6'

x-deploy-base: &deploy-base
  restart_policy:
    delay: 2s

x-deploy-low-priority: &deploy-low-priority
  <<: *deploy-base
  resources:
    limits:
      cpus: '0.05'
      memory: 4M

x-common: &common
  deploy:
    <<: *deploy-base
  networks:
    hostnet: {}

x-low-priority: &low-priority
  <<: *common
  deploy:
    <<: *deploy-low-priority

networks:
  hostnet:
    external: true
    name: host

volumes:
  hkbridge_data:
  node-red_data:
  postgres_data:
  postgres_backups:

services:
  postgres:
    <<: *common
    image: ${IMAGE:-registry.gitlab.[redacted].com.br/[redacted]/central/}postgres:${TAG:-latest}
    volumes:
     - postgres_data:/var/lib/postgresql/data
     - postgres_backups:/opt/postgresql
    environment:
      POSTGRES_USER: [redacted]
      POSTGRES_PASSWORD: [redacted]

  api:
    <<: *common
    image: ${IMAGE:-registry.gitlab.[redacted].com.br/[redacted]/central/}api:${TAG:-latest}
    deploy:
      <<: *deploy-base
      resources:
        limits:
          memory: 16M
    environment:
      DB_USERNAME: [redacted]
      DB_PASSWORD: [redacted]
      DB_DATABASE: [redacted]
      DB_HOST: localhost
      DB_PORT: 5432
      DB_DIALECT: postgres
      SOCKET_URL: ws://localhost:3000/websocket
      CENTRAL_UUID:
      PRIVATE_KEY: # "123321"

  erlradio-launcher:
    <<: *low-priority
    image: docker
    entrypoint: /usr/local/bin/docker
    command:
      - run
      - --rm
      - -eDB_USERNAME
      - -eDB_DATABASE
      - -eDB_HOST
      - -ePOWER_PIN
      - -eCE_PIN
      - -eIRQ_PIN
      - -eCSN_PIN
      - -eSTATUS_PIN
      - -eSPI_DEVICE
      - -ePRIVATE_KEY
      - -eCENTRAL_UUID
      - -eCENTRAL_ID
      - -eFREQUENCY
      - --privileged
      - --name=erlradio
      - --net=host
      - ${IMAGE:-registry.gitlab.[redacted].com.br/[redacted]/central/}erlradio:${TAG:-latest}
    environment:
      DB_USERNAME: [redacted]
      DB_DATABASE: [redacted]
      DB_HOST: localhost
      PRIVATE_KEY: # "123321"
      CENTRAL_UUID: # bf34e45d-253d-421e-ae7c-24be9ee61c24
      CENTRAL_ID: # "[1, 1, 1, 1]"
      FREQUENCY: # "107"
      SPI_DEVICE: "/dev/spidev1.0"
      POWER_PIN: 6
      CE_PIN: 3
      IRQ_PIN: 1
      CSN_PIN: 13
      STATUS_PIN: 7
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /home/autojacuzzi/.docker:/root/.docker:ro

  cloud-client:
    <<: *common
    image: ${IMAGE:-registry.gitlab.[redacted].com.br/[redacted]/central/}cloud-client:${TAG:-latest}
    environment:
      [redacted]_API: localhost
      [redacted]_API_PORT: 8080
      [redacted]_CLOUD_HOST: # server.[redacted].com.br
      [redacted]_CLOUD_HOST_PORT: # 443
      [redacted]_SERVER: localhost
      [redacted]_SERVER_PORT: 3000
      PRIVATE_KEY: # "123321"
      CENTRAL_UUID: # bf34e45d-253d-421e-ae7c-24be9ee61c24

  openvpn-launcher:
    <<: *low-priority
    image: docker
    entrypoint: /usr/local/bin/docker
    command:
      - run
      - --rm
      - --memory=4M
      - --device=/dev/net/tun
      - --volume=/etc/openvpn:/etc/openvpn:ro
      - --net=host
      - --cap-add=NET_ADMIN
      - --name=openvpn
      - ${IMAGE:-registry.gitlab.[redacted].com.br/[redacted]/central/}openvpn:${TAG:-latest}
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /dev/net/tun:/dev/net/tun
      - /etc/openvpn:/etc/openvpn:ro
      - /home/autojacuzzi/.docker:/root/.docker:ro

  avahi:
    <<: *low-priority
    image: ydkn/avahi
    volumes:
      - /etc/avahi/services/:/etc/avahi/services/:ro
      - /etc/hosts:/etc/hosts:ro

  hkbridge:
    <<: *common
    image: ${IMAGE:-registry.gitlab.[redacted].com.br/[redacted]/central/}hkbridge:${TAG:-latest}
    deploy:
      <<: *deploy-base
      resources:
        limits:
          # cpus: '0.5'
          memory: 8M
    environment:
      CENTRAL_ID: # "[1, 1, 1, 1]"
      CENTRAL_UUID: # bf34e45d-253d-421e-ae7c-24be9ee61c24
      CENTRAL_SERIAL: # "0x00000001"
      HOMEKIT_PIN: # "32191123"
      PRIVATE_KEY: # "123321"
      RADIO_HOST: localhost
      RADIO_PORT: "3000"
      API_HOST: localhost
      API_PORT: "8080"
    volumes:
      - hkbridge_data:/data

  node-red:
    <<: *common
    image: ${IMAGE:-registry.gitlab.[redacted].com.br/[redacted]/central/}node-red:${TAG:-latest}
    deploy:
      <<: *deploy-base
      resources:
        limits:
          cpus: '0.5'
          memory: 32M
    volumes:
      - node-red_data:/data

  webadmin:
    <<: *low-priority
    image: ${IMAGE:-registry.gitlab.[redacted].com.br/[redacted]/central/}webadmin:${TAG:-latest}

from podman-compose.

muayyad-alsadi avatar muayyad-alsadi commented on July 17, 2024

I appreciate it if you provide minimal-reproducible-example

from podman-compose.

yangm97 avatar yangm97 commented on July 17, 2024

Sorry for the sloppy report. I've managed to reproduce the issue (using the dev branch) with this compose definition:

version: '3.6'

x-deploy-base: &deploy-base
  restart_policy:
    delay: 2s

x-common: &common
  network: host
  deploy:
    <<: *deploy-base
  networks:
    hostnet: {}

networks:
  hostnet:
    external: true
    name: host

volumes:
  node-red_data:

services:
  node-red:
    <<: *common
    image: yangm97/trash:openvpn
    deploy:
      <<: *deploy-base
      resources:
        limits:
          cpus: '0.5'
          memory: 32M
    volumes:
      - node-red_data:/data

from podman-compose.

muayyad-alsadi avatar muayyad-alsadi commented on July 17, 2024

I've replaced image with to make it run "busybox httpd -f"

https://paste.fedoraproject.org/paste/W8vlAvwNNzEuvTlWh2AH7w

it's basically just (with yaml syntax sugar called anchors )

---
version: '3.6'
networks:
  hostnet:
    external: true
    name: host
volumes:
  node-red_data: 
services:
  node-red:
    network: host
    deploy:
      restart_policy:
        delay: 2s
      resources:
        limits:
          cpus: '0.5'
          memory: 32M
    networks:
      hostnet: {}
    image: busybox
    command: busybox httpd -h /data -f -p 8080
    volumes:
    - node-red_data:/data

from podman-compose.

yangm97 avatar yangm97 commented on July 17, 2024

Works for me, thanks.

from podman-compose.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.