name: ldraw-nova-docker services: ldraw-nova-app: build: context: . additional_contexts: nova: ../ldraw-nova image: ldraw-nova-app platform: linux/amd64 # LeoCAD ships x86_64-only AppImages (emulated on Apple Silicon) container_name: ldraw-nova-app init: true # proper signal handling / zombie reaping (Xvfb + your process) # The web app is available on localhost and the host's LAN IP at this port # (change with LDRAW_NOVA_WEB_PORT in .env). It has no login, so restrict access # with your host firewall on untrusted networks. ports: - "${LDRAW_NOVA_WEB_PORT:-8765}:8000" # HTTPS (self-signed), for headsets: WebXR needs HTTPS or localhost. - "${LDRAW_NOVA_WEB_HTTPS_PORT:-8443}:8443" # OpenAI browser OAuth callback, reachable only on the Docker host. - "127.0.0.1:1455:1456" volumes: - ./data:/data # host ./data <-> container /data (input: everything under it, output: output/) - config:/config # LLM settings, API keys and browser sessions; kept out of ./data # Optional: keys referenced from the UI as "os.environ/NAME" (e.g. ANTHROPIC_API_KEY=...) env_file: - path: .env required: false environment: # Read the host shell or .env value; never put the key in this file. OPENROUTER_API_KEY: ${OPENROUTER_API_KEY:-${OPENROUTER_LDRAW_NOVA_API_KEY:-}} TYPESAFE_API_KEY: ${TYPESAFE_API_KEY:-} # Lets entries like api_base: http://host.docker.internal:11434 reach Ollama / # LM Studio on the host (Docker Desktop has this built in; Linux needs it). extra_hosts: - "host.docker.internal:host-gateway" # The container's main process is the web server, so it stays up and you can # log in any time: # docker compose up -d --build # docker compose exec ldraw-nova-app bash # Then, inside: # python3 /app/leocad_render.py /opt/models-gallery/copper-bean.mpd # python3 /app/example.py # and look at ./data/output on the host. volumes: config: # Persist this project's LLM settings and API keys. name: ldraw-nova-docker_config