mirror of
https://github.com/hanzoai/docdb.git
synced 2026-10-30 18:39:39 +00:00
217 lines
6.7 KiB
YAML
217 lines
6.7 KiB
YAML
---
|
||
# This file is used for the development environment, not for running DocDB in production.
|
||
|
||
services:
|
||
postgres:
|
||
build:
|
||
context: ./build/deps
|
||
dockerfile: postgres-documentdb.Dockerfile
|
||
container_name: docdb_postgres
|
||
command: >
|
||
postgres
|
||
-c log_min_duration_statement=1000ms
|
||
-c log_min_error_statement=WARNING
|
||
-c log_min_messages=WARNING
|
||
-c max_connections=400
|
||
ports:
|
||
- 5432:5432
|
||
extra_hosts:
|
||
- "host.docker.internal:host-gateway"
|
||
environment:
|
||
# UTC−03:30/−02:30. Set to catch timezone problems.
|
||
- TZ=America/St_Johns
|
||
- POSTGRES_USER=pg-user
|
||
- POSTGRES_PASSWORD=pg-pass
|
||
- POSTGRES_DB=postgres
|
||
volumes:
|
||
- ./build/testscripts:/testscripts
|
||
|
||
yugabytedb:
|
||
build:
|
||
context: ./build/deps
|
||
dockerfile: yugabytedb.Dockerfile
|
||
container_name: docdb_yugabytedb
|
||
platform: linux/amd64 # TODO https://github.com/hanzoai/docdb/issues/5369
|
||
# postgresql.conf is populated by "ysql_pg_conf_csv" flag
|
||
# https://docs.yugabyte.com/preview/reference/configuration/yugabyted/#pass-additional-flags-to-yb-master-and-yb-tserver
|
||
command: >
|
||
bin/yugabyted start
|
||
--background=false
|
||
--initial_scripts_dir=/yugabytedb
|
||
--ysql_enable_auth=true
|
||
--master_flags="allowed_preview_flags_csv=ysql_enable_documentdb,ysql_enable_documentdb=true,enable_pg_cron=true,ysql_pg_conf_csv={documentdb.enableUserCrud = true,documentdb.maxUserLimit = 100}"
|
||
--tserver_flags="allowed_preview_flags_csv=ysql_enable_documentdb,ysql_enable_documentdb=true,enable_pg_cron=true,ysql_pg_conf_csv={documentdb.enableUserCrud = true,documentdb.maxUserLimit = 100}"
|
||
ports:
|
||
- 5433:5433
|
||
extra_hosts:
|
||
- "host.docker.internal:host-gateway"
|
||
environment:
|
||
- YSQL_USER=pg-user # this user cannot authenticate against DocDB
|
||
- YSQL_PASSWORD=pg-pass
|
||
- YSQL_DB=yugabyte # DocumentDB extension is installed in yugabyte database
|
||
volumes:
|
||
- ./build/yugabytedb/init.sql:/yugabytedb/init.sql
|
||
|
||
mongodb:
|
||
build:
|
||
context: ./build/deps
|
||
dockerfile: mongodb.Dockerfile
|
||
container_name: docdb_mongodb
|
||
command: --config /etc/mongodb.conf
|
||
ports:
|
||
- 37017:37017
|
||
extra_hosts:
|
||
- "host.docker.internal:host-gateway"
|
||
environment:
|
||
# Always UTC+05:45. Set to catch timezone problems.
|
||
- TZ=Asia/Kathmandu
|
||
ulimits:
|
||
nproc: 65535
|
||
nofile:
|
||
soft: 40000
|
||
hard: 80000
|
||
volumes:
|
||
- ./build/mongodb.conf:/etc/mongodb.conf
|
||
|
||
mongodb-secure:
|
||
build:
|
||
context: ./build/deps
|
||
dockerfile: mongodb.Dockerfile
|
||
container_name: docdb_mongodb_secure
|
||
command: --config /etc/mongodb.conf
|
||
ports:
|
||
- 47017:47017
|
||
extra_hosts:
|
||
- "host.docker.internal:host-gateway"
|
||
environment:
|
||
# Always UTC+05:45. Set to catch timezone problems.
|
||
- TZ=Asia/Kathmandu
|
||
- MONGO_INITDB_ROOT_USERNAME=username
|
||
- MONGO_INITDB_ROOT_PASSWORD=password
|
||
ulimits:
|
||
nproc: 65535
|
||
nofile:
|
||
soft: 40000
|
||
hard: 80000
|
||
volumes:
|
||
- ./build/certs:/etc/certs
|
||
- ./build/mongodb-secure.conf:/etc/mongodb.conf
|
||
|
||
# for test scripts
|
||
legacy-mongo-shell:
|
||
build:
|
||
context: ./build/deps
|
||
dockerfile: legacy-mongo-shell.Dockerfile
|
||
container_name: docdb_legacy-mongo-shell
|
||
extra_hosts:
|
||
- "host.docker.internal:host-gateway"
|
||
environment:
|
||
# Always UTC+05:45. Set to catch timezone problems.
|
||
- TZ=Asia/Kathmandu
|
||
volumes:
|
||
- ./build/certs:/etc/certs
|
||
- ./build/legacy-mongo-shell/test.js:/legacy-mongo-shell/test.js
|
||
|
||
jaeger:
|
||
build:
|
||
context: ./build/deps
|
||
dockerfile: jaeger.Dockerfile
|
||
container_name: docdb_jaeger
|
||
environment:
|
||
- COLLECTOR_OTLP_ENABLED=true
|
||
ports:
|
||
- 4318:4318 # OTLP over HTTP
|
||
- 6831:6831/udp # Compact Thrift from BuildKit
|
||
- 16686:16686 # UI on http://127.0.0.1:16686/
|
||
|
||
trivy:
|
||
build:
|
||
context: ./build/deps
|
||
dockerfile: trivy.Dockerfile
|
||
container_name: docdb_trivy
|
||
volumes:
|
||
- .:/workdir
|
||
|
||
# for YAML files
|
||
prettier:
|
||
build:
|
||
context: ./build/deps
|
||
dockerfile: docdb-prettier.Dockerfile
|
||
container_name: docdb_docdb-prettier
|
||
volumes:
|
||
- .:/workdir
|
||
|
||
# for documentation
|
||
textlint:
|
||
build:
|
||
context: ./build/deps
|
||
dockerfile: docdb-textlint.Dockerfile
|
||
container_name: docdb_docdb-textlint
|
||
volumes:
|
||
- .:/workdir
|
||
markdownlint:
|
||
build:
|
||
context: ./build/deps
|
||
dockerfile: markdownlint.Dockerfile
|
||
container_name: docdb_markdownlint
|
||
volumes:
|
||
- .:/workdir
|
||
wrangler:
|
||
build:
|
||
context: ./build/deps
|
||
dockerfile: docdb-wrangler.Dockerfile
|
||
container_name: docdb_docdb-wrangler
|
||
ports:
|
||
- 8976:8976 # simplifies authentication for testing
|
||
environment:
|
||
- CLOUDFLARE_ACCOUNT_ID
|
||
- CLOUDFLARE_API_TOKEN
|
||
- WRANGLER_SEND_METRICS=false
|
||
# - WRANGLER_LOG=debug # TODO https://github.com/cloudflare/workers-sdk/issues/3073
|
||
volumes:
|
||
- .:/workdir # mount everything for wrangler to pick up branch name, commit hash, etc from git
|
||
docusaurus-docs:
|
||
build:
|
||
context: ./build/deps
|
||
dockerfile: docusaurus-docs.Dockerfile
|
||
container_name: docdb_docusaurus-docs
|
||
ports:
|
||
- 3000:3000
|
||
volumes:
|
||
# shared with blog
|
||
- ./website/babel.config.js:/workdir/docusaurus-docs/babel.config.js:ro
|
||
- ./website/sidebars.js:/workdir/docusaurus-docs/sidebars.js:ro
|
||
- ./website/src:/workdir/docusaurus-docs/src:ro
|
||
- ./website/static:/workdir/docusaurus-docs/static:ro
|
||
- ./website/build:/workdir/docusaurus-docs/build:rw
|
||
|
||
# docs sources
|
||
- ./website/docs:/workdir/docusaurus-docs/docs:rw
|
||
- ./website/docusaurus.config.js:/workdir/docusaurus-docs/docusaurus.config.js:ro
|
||
- ./website/versioned_docs:/workdir/docusaurus-docs/versioned_docs:rw
|
||
- ./website/versioned_sidebars:/workdir/docusaurus-docs/versioned_sidebars:rw
|
||
- ./website/versions.json:/workdir/docusaurus-docs/versions.json:rw
|
||
|
||
docusaurus-blog:
|
||
build:
|
||
context: ./build/deps
|
||
dockerfile: docusaurus-docs.Dockerfile
|
||
container_name: docdb_docusaurus-blog
|
||
ports:
|
||
- 3001:3001
|
||
volumes:
|
||
# shared with docs
|
||
- ./website/babel.config.js:/workdir/docusaurus-docs/babel.config.js:ro
|
||
- ./website/sidebars.js:/workdir/docusaurus-docs/sidebars.js:ro
|
||
- ./website/src:/workdir/docusaurus-docs/src:ro
|
||
- ./website/static:/workdir/docusaurus-docs/static:ro
|
||
- ./website/build:/workdir/docusaurus-docs/build:rw
|
||
|
||
# blog sources
|
||
- ./website/blog:/workdir/docusaurus-docs/blog:ro
|
||
- ./website/docusaurus.config-blog.js:/workdir/docusaurus-docs/docusaurus.config.js:ro
|
||
|
||
networks:
|
||
default:
|
||
name: docdb
|