Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ Cargo.lock
ztm_agent.db
ztm_agent_db*

# Demo env variables
docker/demo/.env

# buck2 out
buck-out

Expand Down
25 changes: 25 additions & 0 deletions docker/demo/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Exclude files / directories not needed in build context for demo services

# VCS
.git

# IDE / editor config
.idea/
.vscode/
*.code-workspace

# OS metadata
.DS_Store

# Rust build artifacts
target/
**/target/

# Node, Python, others
node_modules/
__pycache__/

# Tests, docs, images not required
/tests/
/docs/

144 changes: 144 additions & 0 deletions docker/demo/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
# ============================================================================
# Mega / Orion Demo Environment Configuration File Example
# ============================================================================
#
# Usage:
# 1. Copy this file to .env: cp .env.example .env
# 2. Modify values in .env as needed (do not commit .env to version control)
# 3. Start services with: docker compose -f docker-compose.demo.yml up -d
#
# IMPORTANT: This configuration is for local Demo / demonstration purposes only,
# NOT suitable for production environments!
# ============================================================================

# ----------------------------------------------------------------------------
# PostgreSQL Database Configuration
# ----------------------------------------------------------------------------

POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB_MONO=mono
# Note: Orion Server uses the SAME mono database (no separate orion db required)
# Note: campsite database is now managed by MySQL service

# ----------------------------------------------------------------------------
# MySQL Database Configuration (for Campsite API)
# ----------------------------------------------------------------------------
# Note: For demo purposes, using root user only. For production, create dedicated user.

MYSQL_ROOT_PASSWORD=mysqladmin
MYSQL_DATABASE=campsite

# ----------------------------------------------------------------------------
# RustFS (S3-compatible Object Storage) Configuration
# ----------------------------------------------------------------------------

RUSTFS_ACCESS_KEY=rustfsadmin
RUSTFS_SECRET_KEY=rustfsadmin
RUSTFS_CONSOLE_ENABLE=true

# ----------------------------------------------------------------------------
# S3 Storage Configuration (used by Mega and optionally Orion S3 log store)
# ----------------------------------------------------------------------------

S3_ACCESS_KEY_ID=rustfsadmin
S3_SECRET_ACCESS_KEY=rustfsadmin
S3_REGION=us-east-1

# ----------------------------------------------------------------------------
# Docker Image Configuration
# ----------------------------------------------------------------------------
# All images are pulled from Amazon ECR Public: public.ecr.aws/m8q5m4u3/mega
# You can override these to use local images or different tags
#
# For local builds:
# ORION_SERVER_IMAGE=orion-server:latest
# MEGA_ENGINE_IMAGE=mega:mono-engine-latest

MEGA_ENGINE_IMAGE=public.ecr.aws/m8q5m4u3/mega:mono-0.1.0-pre-release
MEGA_UI_IMAGE=public.ecr.aws/m8q5m4u3/mega:mega-ui-staging-0.1.0-pre-release
ORION_SERVER_IMAGE=public.ecr.aws/m8q5m4u3/mega:orion-server-0.1.0-pre-release
MEGA_DEV_IMAGE=public.ecr.aws/m8q5m4u3/mega:mega-dev-0.1.0-pre-release
CAMPSITE_API_IMAGE=campsite-api:latest

# ----------------------------------------------------------------------------
# Mega Backend Service Configuration
# ----------------------------------------------------------------------------

MEGA_DATABASE__DB_TYPE=postgres
MEGA_DATABASE__DB_URL=postgres://postgres:postgres@postgres:5432/mono
MEGA_REDIS__URL=redis://redis:6379

MEGA_MONOREPO__STORAGE_TYPE=s3
MEGA_S3__ENDPOINT_URL=http://rustfs:9000
MEGA_S3__BUCKET=mega
MEGA_S3__REGION=us-east-1

MEGA_LOG__LEVEL=info
MEGA_LOG__PRINT_STD=true

MEGA_AUTHENTICATION__ENABLE_TEST_USER=true
MEGA_AUTHENTICATION__TEST_USER_NAME=mega
MEGA_AUTHENTICATION__TEST_USER_TOKEN=mega

MEGA_BUILD__ENABLE_BUILD=true
MEGA_BUILD__ORION_SERVER=http://orion_server:8004

MEGA_OAUTH__CAMPSITE_API_DOMAIN=http://campsite_api:8080
MEGA_OAUTH__UI_DOMAIN=http://localhost:3000
MEGA_OAUTH__COOKIE_DOMAIN=localhost
MEGA_OAUTH__ALLOWED_CORS_ORIGINS=http://localhost:3000

MEGA_BASE_DIR=/opt/mega
MEGA_CACHE_DIR=/opt/mega/cache

# ----------------------------------------------------------------------------
# Mega UI (Frontend) Configuration
# ----------------------------------------------------------------------------

MEGA_INTERNAL_HOST=http://mega:8000
MEGA_HOST=http://localhost:8000
NEXT_PUBLIC_ORION_API_URL=http://orion_server:8004

# ----------------------------------------------------------------------------
# Orion Server Configuration
# ----------------------------------------------------------------------------
# IMPORTANT: Orion Server uses mono database

ORION_DATABASE_URL=postgres://postgres:postgres@postgres:5432/mono
ORION_BUILD_LOG_DIR=/tmp/buck2ctl
ORION_ALLOWED_CORS_ORIGINS=http://localhost:3000,http://127.0.0.1:3000,http://localhost:8000
ORION_LOGGER_STORAGE_TYPE=local
ORION_BUCKET_NAME=orion-logs

# ----------------------------------------------------------------------------
# Orion Build Client / Worker Configuration
# ----------------------------------------------------------------------------

ORION_WORKER_SERVER_WS=ws://orion_server:8004/ws
ORION_WORKER_ID=
BUCK_PROJECT_ROOT=/workspace
BUILD_TMP=/tmp/orion-builds
SCORPIO_API_BASE_URL=http://127.0.0.1:2725
ORION_WORKER_START_SCORPIO=true
SCORPIO_BASE_URL=http://mega:8000
SCORPIO_LFS_URL=http://mega:8000
RUST_LOG=info

# ----------------------------------------------------------------------------
# Campsite API Configuration
# ----------------------------------------------------------------------------

CAMPSITE_DATABASE_URL=mysql2://root:mysqladmin@mysql:3306/campsite
CAMPSITE_REDIS_URL=redis://redis:6379
CAMPSITE_RAILS_ENV=development
CAMPSITE_SERVER_COMMAND=bundle exec puma
CAMPSITE_DEV_APP_URL=http://localhost:3000
# Generate master key (run before first build):
# VISUAL="code -n --wait" ./bin/rails credentials:edit --environment development
# Copy the generated key and paste it below.
CAMPSITE_RAILS_MASTER_KEY=your-master-key-here

# Run migrations only on first startup; set to 0 afterwards for faster launches.
# 1 = run migrations (default first run) | 0 = skip migrations
CAMPSITE_RUN_MIGRATIONS=1
Loading