Skip to content

Latest commit

 

History

History
53 lines (46 loc) · 1.33 KB

File metadata and controls

53 lines (46 loc) · 1.33 KB

Docker Compose

Use docker-compose.yml to run the app.

Docker Desktop (Mac/Windows) and most Linux setups

This variant publishes port 5000 and defines host.docker.internal for host access.

services:
  web:
    build: .
    image: opensentry-command:latest
    ports:
      - "5000:5000"
    extra_hosts:
      - "host.docker.internal:host-gateway"
    environment:
      HOST: 0.0.0.0
      PORT: 5000
      SECRET_KEY: ${SECRET_KEY:-change-me}
    volumes:
      - ./config_store.json:/app/config_store.json
      # - ./devices_store.json:/app/devices_store.json
    restart: unless-stopped

Commands:

docker compose up -d --build
docker compose logs -f --tail=100 web

Open http://localhost:5000

  • For OAuth2 on the host: use http://host.docker.internal:8000 as the base URL in app settings. Ensure your OAuth client allows http://localhost:5000/oauth2/callback.

Native Linux with host networking (for mDNS)

If you need full multicast/mDNS, switch to host networking:

services:
  web:
    build: .
    image: opensentry-command:latest
    network_mode: host
    environment:
      HOST: 0.0.0.0
      PORT: 5000
      SECRET_KEY: ${SECRET_KEY:-change-me}
    volumes:
      - ./config_store.json:/app/config_store.json
    restart: unless-stopped

Open the printed address, e.g. http://127.0.0.1:5000