open-notebook/examples/docker-compose-single.yml
Luis Novo 12ced05b3a
build: converge Docker builds into a single multi-stage Dockerfile (#1066)
Both published image variants are now built from one Dockerfile with
shared stages, so deploy fixes no longer have to be applied twice:

- regular (multi-container): default build / --target runtime
- single-container (app + SurrealDB): --target single

Dockerfile.single and supervisord.single.conf are removed. The single
image appends supervisord.surrealdb.conf (the SurrealDB program block)
to the shared supervisord.conf at build time. CI workflows, Makefile
targets and the single-container compose example now build via
--target; published image names and tags are unchanged.
2026-07-11 18:46:43 -03:00

24 lines
No EOL
835 B
YAML

services:
open_notebook_single:
# image: lfnovo/open_notebook:v1-latest-single
build:
context: .
dockerfile: Dockerfile
target: single
ports:
- "8502:8502" # Next.js Frontend
- "5055:5055" # REST API
env_file:
- ./docker.env
environment:
# Override for single-container mode: SurrealDB runs on localhost inside the same container
- SURREAL_URL=ws://localhost:8000/rpc
volumes:
- ./notebook_data:/app/data # Application data
- ./surreal_single_data:/mydata # SurrealDB data
restart: always
# Single container includes all services: SurrealDB, API, Worker, and Next.js Frontend
# Access:
# - Next.js UI: http://localhost:8502
# - REST API: http://localhost:5055
# - API Documentation: http://localhost:5055/docs