# Copyright The Pit Project Owners. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Please see https://officer.openpit.dev and the OWNERS file for details. # docker-compose for pit-officer in `serve` mode. # # Build the image from the officer module root before `docker compose up`: # # just docker-build services: officer: image: pit-officer:local # Uncomment to build directly from source: # build: # context: . # dockerfile: Dockerfile command: ["serve"] ports: # Expose the dashboard + MCP-over-HTTP port. # Bind to 127.0.0.1 on the host so the service is not reachable from # outside the host without an explicit override. - "127.0.0.1:8787:8787" environment: # Bind to all container-network interfaces (see Dockerfile note). PIT_OFFICER_HTTP_ADDR: "0.0.0.0:8787" # SQLite database inside the persistent volume. PIT_OFFICER_SQLITE_PATH: "/data/pit-officer.db" # Headless container: never attempt to launch a browser on serve start. PIT_OFFICER_OPEN_BROWSER: "false" # Passed through only when set on the host; an empty value is configured # but invalid, not absent. PIT_OFFICER_MASTER_KEY: PIT_OFFICER_MASTER_KEY_FILE: # PIT_OFFICER_MASTER_KEY_FILE requires the key file to be bind-mounted # into the container. # The root filesystem is read-only, so mount that file read-only at the # operator's chosen path. # Optional: pin a pre-extracted OpenPit runtime library via a bind mount. # OPENPIT_RUNTIME_LIBRARY_PATH: /app/lib/libopenpit_ffi.so volumes: # Named volume for the SQLite database. The database persists across # container restarts and image upgrades. - officer_data:/data restart: unless-stopped # Drop all Linux capabilities; the service does not need any. cap_drop: - ALL # Read-only root filesystem. /data is the volume; /tmp is a tmpfs that stays # executable because the OpenPit SDK extracts and loads its native runtime # there (OPENPIT_RUNTIME_CACHE_DIR in the Dockerfile). read_only: true tmpfs: - /tmp:size=64m,mode=1777,exec volumes: # Persistent storage for the Officer SQLite database. officer_data: driver: local