1+ # ============================================================================
2+ # Mega / Orion Demo Environment Configuration File Example
3+ # ============================================================================
4+ #
5+ # Usage:
6+ # 1. Copy this file to .env: cp .env.example .env
7+ # 2. Modify values in .env as needed (do not commit .env to version control)
8+ # 3. Start services with: docker compose -f docker-compose.demo.yml up -d
9+ #
10+ # IMPORTANT: This configuration is for local Demo / demonstration purposes only,
11+ # NOT suitable for production environments!
12+ # ============================================================================
13+
14+ # ----------------------------------------------------------------------------
15+ # PostgreSQL Database Configuration
16+ # ----------------------------------------------------------------------------
17+
18+ POSTGRES_USER = postgres
19+ POSTGRES_PASSWORD = postgres
20+ POSTGRES_DB_MONO = mono
21+ # Note: Orion Server uses the SAME mono database (no separate orion db required)
22+ # Note: campsite database is now managed by MySQL service
23+
24+ # ----------------------------------------------------------------------------
25+ # MySQL Database Configuration (for Campsite API)
26+ # ----------------------------------------------------------------------------
27+ # Note: For demo purposes, using root user only. For production, create dedicated user.
28+
29+ MYSQL_ROOT_PASSWORD = mysqladmin
30+ MYSQL_DATABASE = campsite
31+
32+ # ----------------------------------------------------------------------------
33+ # RustFS (S3-compatible Object Storage) Configuration
34+ # ----------------------------------------------------------------------------
35+
36+ RUSTFS_ACCESS_KEY = rustfsadmin
37+ RUSTFS_SECRET_KEY = rustfsadmin
38+ RUSTFS_CONSOLE_ENABLE = true
39+
40+ # ----------------------------------------------------------------------------
41+ # S3 Storage Configuration (used by Mega and optionally Orion S3 log store)
42+ # ----------------------------------------------------------------------------
43+
44+ S3_ACCESS_KEY_ID = rustfsadmin
45+ S3_SECRET_ACCESS_KEY = rustfsadmin
46+ S3_REGION = us-east-1
47+
48+ # ----------------------------------------------------------------------------
49+ # Docker Image Configuration
50+ # ----------------------------------------------------------------------------
51+ # All images are pulled from Amazon ECR Public: public.ecr.aws/m8q5m4u3/mega
52+ # You can override these to use local images or different tags
53+ #
54+ # For local builds:
55+ # ORION_SERVER_IMAGE=orion-server:latest
56+ # MEGA_ENGINE_IMAGE=mega:mono-engine-latest
57+
58+ MEGA_ENGINE_IMAGE = public.ecr.aws/m8q5m4u3/mega:mono-0.1.0-pre-release
59+ MEGA_UI_IMAGE = public.ecr.aws/m8q5m4u3/mega:mega-ui-staging-0.1.0-pre-release
60+ ORION_SERVER_IMAGE = public.ecr.aws/m8q5m4u3/mega:orion-server-0.1.0-pre-release
61+ MEGA_DEV_IMAGE = public.ecr.aws/m8q5m4u3/mega:mega-dev-0.1.0-pre-release
62+ CAMPSITE_API_IMAGE = campsite-api:latest
63+
64+ # ----------------------------------------------------------------------------
65+ # Mega Backend Service Configuration
66+ # ----------------------------------------------------------------------------
67+
68+ MEGA_DATABASE__DB_TYPE = postgres
69+ MEGA_DATABASE__DB_URL = postgres://postgres:postgres@postgres:5432/mono
70+ MEGA_REDIS__URL = redis://redis:6379
71+
72+ MEGA_MONOREPO__STORAGE_TYPE = s3
73+ MEGA_S3__ENDPOINT_URL = http://rustfs:9000
74+ MEGA_S3__BUCKET = mega
75+ MEGA_S3__REGION = us-east-1
76+
77+ MEGA_LOG__LEVEL = info
78+ MEGA_LOG__PRINT_STD = true
79+
80+ MEGA_AUTHENTICATION__ENABLE_TEST_USER = true
81+ MEGA_AUTHENTICATION__TEST_USER_NAME = mega
82+ MEGA_AUTHENTICATION__TEST_USER_TOKEN = mega
83+
84+ MEGA_BUILD__ENABLE_BUILD = true
85+ MEGA_BUILD__ORION_SERVER = http://orion_server:8004
86+
87+ MEGA_OAUTH__CAMPSITE_API_DOMAIN = http://campsite_api:8080
88+ MEGA_OAUTH__UI_DOMAIN = http://localhost:3000
89+ MEGA_OAUTH__COOKIE_DOMAIN = localhost
90+ MEGA_OAUTH__ALLOWED_CORS_ORIGINS = http://localhost:3000
91+
92+ MEGA_BASE_DIR = /opt/mega
93+ MEGA_CACHE_DIR = /opt/mega/cache
94+
95+ # ----------------------------------------------------------------------------
96+ # Mega UI (Frontend) Configuration
97+ # ----------------------------------------------------------------------------
98+
99+ MEGA_INTERNAL_HOST = http://mega:8000
100+ MEGA_HOST = http://localhost:8000
101+ NEXT_PUBLIC_ORION_API_URL = http://orion_server:8004
102+
103+ # ----------------------------------------------------------------------------
104+ # Orion Server Configuration
105+ # ----------------------------------------------------------------------------
106+ # IMPORTANT: Orion Server uses mono database
107+
108+ ORION_DATABASE_URL = postgres://postgres:postgres@postgres:5432/mono
109+ ORION_BUILD_LOG_DIR = /tmp/buck2ctl
110+ ORION_ALLOWED_CORS_ORIGINS = http://localhost:3000,http://127.0.0.1:3000,http://localhost:8000
111+ ORION_LOGGER_STORAGE_TYPE = local
112+ ORION_BUCKET_NAME = orion-logs
113+
114+ # ----------------------------------------------------------------------------
115+ # Orion Build Client / Worker Configuration
116+ # ----------------------------------------------------------------------------
117+
118+ ORION_WORKER_SERVER_WS = ws://orion_server:8004/ws
119+ ORION_WORKER_ID =
120+ BUCK_PROJECT_ROOT = /workspace
121+ BUILD_TMP = /tmp/orion-builds
122+ SCORPIO_API_BASE_URL = http://127.0.0.1:2725
123+ ORION_WORKER_START_SCORPIO = true
124+ SCORPIO_BASE_URL = http://mega:8000
125+ SCORPIO_LFS_URL = http://mega:8000
126+ RUST_LOG = info
127+
128+ # ----------------------------------------------------------------------------
129+ # Campsite API Configuration
130+ # ----------------------------------------------------------------------------
131+
132+ CAMPSITE_DATABASE_URL = mysql2://root:mysqladmin@mysql:3306/campsite
133+ CAMPSITE_REDIS_URL = redis://redis:6379
134+ CAMPSITE_RAILS_ENV = development
135+ CAMPSITE_SERVER_COMMAND = bundle exec puma
136+ CAMPSITE_DEV_APP_URL = http://localhost:3000
137+ # Generate master key (run before first build):
138+ # VISUAL="code -n --wait" ./bin/rails credentials:edit --environment development
139+ # Copy the generated key and paste it below.
140+ CAMPSITE_RAILS_MASTER_KEY = your-master-key-here
141+
142+ # Run migrations only on first startup; set to 0 afterwards for faster launches.
143+ # 1 = run migrations (default first run) | 0 = skip migrations
144+ CAMPSITE_RUN_MIGRATIONS = 1
0 commit comments