1.1 224 changes
This commit is contained in:
44
mainroom/.env.example
Normal file
44
mainroom/.env.example
Normal file
@@ -0,0 +1,44 @@
|
||||
# Mainroom - Environment Configuration
|
||||
# Copy this file to .env and fill in your values
|
||||
#
|
||||
# This configuration is shared across all services in mainroom
|
||||
# Individual services can override these values in their own .env files
|
||||
|
||||
# =============================================================================
|
||||
# DEPLOYMENT CONFIG
|
||||
# =============================================================================
|
||||
# Unique identifier for this deployment (used for container/network names)
|
||||
DEPLOYMENT_NAME=soleprint
|
||||
|
||||
# Network name for Docker services
|
||||
NETWORK_NAME=soleprint_network
|
||||
|
||||
# =============================================================================
|
||||
# DOMAINS (Local Development)
|
||||
# =============================================================================
|
||||
# Domain for soleprint services
|
||||
SOLEPRINT_DOMAIN=soleprint.local.com
|
||||
|
||||
# Domain for the managed application (e.g., amar)
|
||||
MANAGED_DOMAIN=amar.local.com
|
||||
|
||||
# =============================================================================
|
||||
# SOLEPRINT PATHS
|
||||
# =============================================================================
|
||||
# Path to generated soleprint instance
|
||||
SOLEPRINT_BARE_PATH=/home/mariano/wdir/spr/gen
|
||||
|
||||
# =============================================================================
|
||||
# PORTS
|
||||
# =============================================================================
|
||||
SOLEPRINT_PORT=12000
|
||||
ARTERY_PORT=12001
|
||||
ATLAS_PORT=12002
|
||||
STATION_PORT=12003
|
||||
|
||||
# =============================================================================
|
||||
# MANAGED APP CONFIG (when using with amar or other rooms)
|
||||
# =============================================================================
|
||||
# Complete nginx location blocks for the managed domain
|
||||
# This is where you define your app's routing structure
|
||||
# See cfg/amar/.env.example for managed app specific config
|
||||
32
mainroom/soleprint/.env
Normal file
32
mainroom/soleprint/.env
Normal file
@@ -0,0 +1,32 @@
|
||||
# Soleprint Docker Services - Environment Configuration
|
||||
# Copy this file to .env
|
||||
|
||||
# =============================================================================
|
||||
# DEPLOYMENT
|
||||
# =============================================================================
|
||||
DEPLOYMENT_NAME=soleprint
|
||||
NETWORK_NAME=soleprint_network
|
||||
|
||||
# =============================================================================
|
||||
# PATHS
|
||||
# =============================================================================
|
||||
# Path to generated soleprint (gen/ folder)
|
||||
SOLEPRINT_BARE_PATH=/tmp/soleprint-deploy
|
||||
|
||||
# =============================================================================
|
||||
# PORTS
|
||||
# =============================================================================
|
||||
SOLEPRINT_PORT=12000
|
||||
ARTERY_PORT=12001
|
||||
ATLAS_PORT=12002
|
||||
STATION_PORT=12003
|
||||
|
||||
# =============================================================================
|
||||
# DATABASE (for station tools that need DB access)
|
||||
# =============================================================================
|
||||
# These are passed to station container when orchestrated with managed room
|
||||
DB_HOST=
|
||||
DB_PORT=5432
|
||||
DB_NAME=
|
||||
DB_USER=
|
||||
DB_PASSWORD=
|
||||
33
mainroom/soleprint/.env.example
Normal file
33
mainroom/soleprint/.env.example
Normal file
@@ -0,0 +1,33 @@
|
||||
# Soleprint Docker Services - Environment Configuration
|
||||
# Copy this file to .env
|
||||
|
||||
# =============================================================================
|
||||
# DEPLOYMENT
|
||||
# =============================================================================
|
||||
DEPLOYMENT_NAME=soleprint
|
||||
NETWORK_NAME=soleprint_network
|
||||
|
||||
# =============================================================================
|
||||
# PATHS
|
||||
# =============================================================================
|
||||
# Path to deployed soleprint (use deploy build, not gen/)
|
||||
# For dev: python build.py deploy --output /path/to/deploy
|
||||
SOLEPRINT_BARE_PATH=/tmp/soleprint-deploy
|
||||
|
||||
# =============================================================================
|
||||
# PORTS
|
||||
# =============================================================================
|
||||
SOLEPRINT_PORT=12000
|
||||
ARTERY_PORT=12001
|
||||
ATLAS_PORT=12002
|
||||
STATION_PORT=12003
|
||||
|
||||
# =============================================================================
|
||||
# DATABASE (for station tools that need DB access)
|
||||
# =============================================================================
|
||||
# These are passed to station container when orchestrated with managed room
|
||||
DB_HOST=
|
||||
DB_PORT=5432
|
||||
DB_NAME=
|
||||
DB_USER=
|
||||
DB_PASSWORD=
|
||||
@@ -1,23 +1,16 @@
|
||||
# Soleprint Services - Docker Compose
|
||||
#
|
||||
# Creates: soleprint, artery, atlas, station
|
||||
# Network: Joins mainroom network (external)
|
||||
# Runs soleprint hub as a single service
|
||||
# Artery, atlas, station are accessed via path-based routing
|
||||
#
|
||||
# Usage:
|
||||
# cd mainroom/soleprint && docker compose up -d
|
||||
#
|
||||
# Code: Mounts from bare metal at SOLEPRINT_BARE_PATH (restart to pick up changes)
|
||||
#
|
||||
# FUTURE: Room Switching
|
||||
# - Station UI selector to pick target room
|
||||
# - Environment loaded from data/rooms.json
|
||||
# - DB_HOST, managed app URLs change based on selected room
|
||||
|
||||
services:
|
||||
soleprint:
|
||||
build:
|
||||
context: ${SOLEPRINT_BARE_PATH}
|
||||
dockerfile: ${SOLEPRINT_BARE_PATH}/Dockerfile
|
||||
dockerfile: Dockerfile
|
||||
container_name: ${DEPLOYMENT_NAME}_soleprint
|
||||
volumes:
|
||||
- ${SOLEPRINT_BARE_PATH}:/app
|
||||
@@ -25,67 +18,15 @@ services:
|
||||
- "${SOLEPRINT_PORT}:8000"
|
||||
env_file:
|
||||
- .env
|
||||
networks:
|
||||
- default
|
||||
command: uvicorn main:app --host 0.0.0.0 --port 8000
|
||||
|
||||
artery:
|
||||
build:
|
||||
context: ${SOLEPRINT_BARE_PATH}/artery
|
||||
dockerfile: ${SOLEPRINT_BARE_PATH}/Dockerfile
|
||||
container_name: ${DEPLOYMENT_NAME}_artery
|
||||
volumes:
|
||||
- ${SOLEPRINT_BARE_PATH}/artery:/app
|
||||
ports:
|
||||
- "${ARTERY_PORT}:8000"
|
||||
env_file:
|
||||
- .env
|
||||
depends_on:
|
||||
- soleprint
|
||||
networks:
|
||||
- default
|
||||
command: uvicorn main:app --host 0.0.0.0 --port 8000
|
||||
|
||||
atlas:
|
||||
build:
|
||||
context: ${SOLEPRINT_BARE_PATH}/atlas
|
||||
dockerfile: ${SOLEPRINT_BARE_PATH}/Dockerfile
|
||||
container_name: ${DEPLOYMENT_NAME}_atlas
|
||||
volumes:
|
||||
- ${SOLEPRINT_BARE_PATH}/atlas:/app
|
||||
ports:
|
||||
- "${ATLAS_PORT}:8000"
|
||||
env_file:
|
||||
- .env
|
||||
depends_on:
|
||||
- soleprint
|
||||
networks:
|
||||
- default
|
||||
command: uvicorn main:app --host 0.0.0.0 --port 8000
|
||||
|
||||
station:
|
||||
build:
|
||||
context: ${SOLEPRINT_BARE_PATH}/station
|
||||
dockerfile: ${SOLEPRINT_BARE_PATH}/Dockerfile
|
||||
container_name: ${DEPLOYMENT_NAME}_station
|
||||
environment:
|
||||
# Database connection (from mainroom/.env when orchestrated)
|
||||
- DB_HOST
|
||||
- DB_PORT
|
||||
- DB_NAME
|
||||
- DB_USER
|
||||
- DB_PASSWORD
|
||||
volumes:
|
||||
- ${SOLEPRINT_BARE_PATH}/station:/app
|
||||
ports:
|
||||
- "${STATION_PORT}:8000"
|
||||
env_file:
|
||||
- .env
|
||||
depends_on:
|
||||
- soleprint
|
||||
# For single-port mode, all subsystems are internal routes
|
||||
- ARTERY_EXTERNAL_URL=/artery
|
||||
- ATLAS_EXTERNAL_URL=/atlas
|
||||
- STATION_EXTERNAL_URL=/station
|
||||
networks:
|
||||
- default
|
||||
command: uvicorn main:app --host 0.0.0.0 --port 8000
|
||||
# Use run.py for single-port bare-metal mode
|
||||
command: uvicorn run:app --host 0.0.0.0 --port 8000 --reload
|
||||
|
||||
networks:
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user