# Metabobank Client - user deployment file (v3.0 layout, same as # https://www.metabobank.cn/download) # Downloaded and verified by start.sh; can also be used manually with # `docker compose up -d`. # # Note: this file intentionally sets no container_name, so containers are named # -metabospark-1 etc. That means it can run side by side with # an existing Metabobank production deployment on the same host without # clashing with fixed names such as metabospark / mongodb5_client. # # Environment variables (written to .env by start.sh, or set manually): # METABOBANK_PORT web port (default 8090) # METABOBANK_DB_PORT published MongoDB port (default 27023) # METABOBANK_RSERVE_PORT Rserve port (default 6322, internal only) # METABOBANK_DATA data directory (default ./metabobank_data, holds dbs/) services: metabospark: image: metabank/metabospark:v3.0 restart: unless-stopped ports: - "${METABOBANK_PORT:-8090}:8090" environment: TZ: Asia/Shanghai # Reach MongoDB by service name inside the compose network, which # overrides any 127.0.0.1 value from .env # (127.0.0.1 inside a container means the container itself; to reuse a # mongod on the host, switch this service to network_mode: host) METABOBANK_DB_HOST: "${METABOBANK_DB_HOST:-mongodb5_client}" # container -> mongo service always uses 27023, not the published port METABOBANK_DB_PORT: "27023" # Database credentials: the image's own start.sh reads these, so without # them it cannot authenticate against an auth-enabled MongoDB METABOBANK_DB_USER: "${METABOBANK_DB_USER:-docker_user}" METABOBANK_DB_PASS: "${METABOBANK_DB_PASS:-docker@2026}" METABOBANK_DB_AUTH: "${METABOBANK_DB_AUTH:-admin}" # Account used by the web application to sync data METABOBANK_SYNC_USER: "${METABOBANK_SYNC_USER:-webuser}" METABOBANK_SYNC_PASS: "${METABOBANK_SYNC_PASS:-passw0rd}" # Omics analysis via Rserve (the legacy image listens on 6322) MB_RSERVE_HOST: rserve MB_RSERVE_PORT: "6322" MB_RSERVE_CONNECT_TIMEOUT: "10" MB_RSERVE_EVAL_TIMEOUT: "1800" volumes: # Uploaded samples, parsed results and exports # (the application uses rootPath=/metabobank_data) - "${METABOBANK_DATA:-./metabobank_data}:/metabobank_data" depends_on: - mongodb5_client - rserve healthcheck: test: ["CMD-SHELL", "wget -q -O /dev/null http://127.0.0.1:8090/login || exit 1"] interval: 30s timeout: 5s retries: 5 start_period: 40s networks: - metabobank mongodb5_client: # All-in-one image: mongod5_client binary + configuration + a pre-seeded # mass spectrometry data snapshot # A production host can mount its own data directory; the entrypoint only # seeds the snapshot when the directory is empty and never overwrites data image: metabank/mongodb5_client:v3.0 restart: unless-stopped user: "0:0" # The database port is not published to the host: only the metabospark # container reaches it, over the compose network, at # mongodb5_client:27023. Nothing on the host needs 27023. # To connect from host tools (mongosh, Compass), uncomment the two lines # below; start.sh then adds 27023 back to its port check automatically. # ports: # - "127.0.0.1:${METABOBANK_DB_PORT:-27023}:27023" volumes: - "${METABOBANK_DATA:-./metabobank_data}/dbs:/opt/mongodb5_client/dbs" healthcheck: test: ["CMD-SHELL", "exec 3<>/dev/tcp/127.0.0.1/27023 && echo ok || exit 1"] interval: 30s timeout: 5s retries: 5 start_period: 60s networks: - metabobank rserve: image: metabank/metabospark-omics:v3.0 restart: unless-stopped # Only reachable from metabospark inside the network; no host port is used # 6322 is the port Rserve actually listens on (same as the legacy # omics_r43:v2.0 image / Dockerfile_omics) expose: - "6322" - "6311" # Shares the data volume with metabospark so that R scripts can setwd / # Read.TextData on the CSVs and write PNGs back volumes: - "${METABOBANK_DATA:-./metabobank_data}:/metabobank_data" networks: - metabobank networks: metabobank: driver: bridge