chore: move docker-compose files to deploy/
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
services:
|
||||
# -------------------------
|
||||
# LEADER NODE
|
||||
# -------------------------
|
||||
leader:
|
||||
build: .
|
||||
container_name: uptop-leader
|
||||
ports:
|
||||
- "23234:23234" # SSH
|
||||
- "8080:8080" # HTTP
|
||||
environment:
|
||||
- UPTOP_DB_TYPE=postgres
|
||||
# Note: Port 5432 is correct here because we are talking INSIDE the network
|
||||
- UPTOP_DB_DSN=postgres://devuser:devpass@leader-db:5432/uptop_dev?sslmode=disable
|
||||
- UPTOP_HTTP_PORT=8080
|
||||
- UPTOP_STATUS_ENABLED=true
|
||||
- UPTOP_STATUS_TITLE=Leader Node
|
||||
|
||||
# Cluster Config
|
||||
- UPTOP_CLUSTER_MODE=leader
|
||||
- UPTOP_CLUSTER_SECRET=mysecret
|
||||
depends_on:
|
||||
- leader-db
|
||||
stdin_open: true
|
||||
tty: true
|
||||
|
||||
leader-db:
|
||||
image: postgres:15-alpine
|
||||
container_name: uptop-leader-db
|
||||
environment:
|
||||
POSTGRES_USER: devuser
|
||||
POSTGRES_PASSWORD: devpass
|
||||
POSTGRES_DB: uptop_dev
|
||||
volumes:
|
||||
- ./tmp/leader-data:/var/lib/postgresql/data
|
||||
|
||||
# -------------------------
|
||||
# FOLLOWER NODE
|
||||
# -------------------------
|
||||
follower:
|
||||
build: .
|
||||
container_name: uptop-follower
|
||||
ports:
|
||||
- "23233:23234" # SSH (Mapped to different host port)
|
||||
- "8081:8080" # HTTP (Mapped to different host port)
|
||||
environment:
|
||||
- UPTOP_DB_TYPE=postgres
|
||||
# Connects to its OWN database
|
||||
- UPTOP_DB_DSN=postgres://devuser:devpass@follower-db:5432/uptop_dev?sslmode=disable
|
||||
- UPTOP_HTTP_PORT=8080
|
||||
- UPTOP_STATUS_ENABLED=true
|
||||
- UPTOP_STATUS_TITLE=Follower Node
|
||||
|
||||
# Cluster Config
|
||||
- UPTOP_CLUSTER_MODE=follower
|
||||
- UPTOP_CLUSTER_SECRET=mysecret
|
||||
# IMPORTANT: Uses the Service Name "leader" to connect internally
|
||||
- UPTOP_PEER_URL=http://leader:8080
|
||||
depends_on:
|
||||
- follower-db
|
||||
stdin_open: true
|
||||
tty: true
|
||||
|
||||
follower-db:
|
||||
image: postgres:15-alpine
|
||||
container_name: uptop-follower-db
|
||||
environment:
|
||||
POSTGRES_USER: devuser
|
||||
POSTGRES_PASSWORD: devpass
|
||||
POSTGRES_DB: uptop_dev
|
||||
volumes:
|
||||
- ./tmp/follower-data:/var/lib/postgresql/data
|
||||
@@ -0,0 +1,36 @@
|
||||
services:
|
||||
# The Application
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: uptop-dev
|
||||
ports:
|
||||
- "23234:23234" # SSH Access
|
||||
- "8080:8080" # HTTP (Push Monitors + Status Page)
|
||||
environment:
|
||||
# --- Database Configuration (Postgres) ---
|
||||
- UPTOP_DB_TYPE=postgres
|
||||
- UPTOP_DB_DSN=postgres://devuser:devpass@postgres:5432/uptop_dev?sslmode=disable
|
||||
|
||||
# --- Web Server Configuration (Phase 4) ---
|
||||
- UPTOP_HTTP_PORT=8080
|
||||
- UPTOP_STATUS_ENABLED=true
|
||||
- UPTOP_STATUS_TITLE=Dev Infrastructure Status
|
||||
depends_on:
|
||||
- postgres
|
||||
stdin_open: true # Required for 'docker attach' (Local Admin Console)
|
||||
tty: true # Required for TUI rendering
|
||||
|
||||
# The Database
|
||||
postgres:
|
||||
image: postgres:15-alpine
|
||||
container_name: uptop-postgres
|
||||
environment:
|
||||
POSTGRES_USER: devuser
|
||||
POSTGRES_PASSWORD: devpass
|
||||
POSTGRES_DB: uptop_dev
|
||||
ports:
|
||||
- "5432:5432" # Expose for external DB tools (DBeaver, etc.)
|
||||
volumes:
|
||||
- ./tmp/pgdata:/var/lib/postgresql/data
|
||||
@@ -0,0 +1,35 @@
|
||||
services:
|
||||
leader:
|
||||
build: .
|
||||
environment:
|
||||
- UPTOP_CLUSTER_MODE=leader
|
||||
- UPTOP_CLUSTER_SECRET=changeme
|
||||
- UPTOP_AGG_STRATEGY=any-down
|
||||
- UPTOP_STATUS_ENABLED=true
|
||||
ports:
|
||||
- "8080:8080"
|
||||
- "23234:23234"
|
||||
|
||||
probe-us-east:
|
||||
build: .
|
||||
environment:
|
||||
- UPTOP_CLUSTER_MODE=probe
|
||||
- UPTOP_NODE_ID=us-east-1
|
||||
- UPTOP_NODE_NAME=US East Probe
|
||||
- UPTOP_NODE_REGION=us-east
|
||||
- UPTOP_PEER_URL=http://leader:8080
|
||||
- UPTOP_CLUSTER_SECRET=changeme
|
||||
depends_on:
|
||||
- leader
|
||||
|
||||
probe-eu-west:
|
||||
build: .
|
||||
environment:
|
||||
- UPTOP_CLUSTER_MODE=probe
|
||||
- UPTOP_NODE_ID=eu-west-1
|
||||
- UPTOP_NODE_NAME=EU West Probe
|
||||
- UPTOP_NODE_REGION=eu-west
|
||||
- UPTOP_PEER_URL=http://leader:8080
|
||||
- UPTOP_CLUSTER_SECRET=changeme
|
||||
depends_on:
|
||||
- leader
|
||||
@@ -0,0 +1,20 @@
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: uptop
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "23234:23234"
|
||||
- "8080:8080"
|
||||
environment:
|
||||
- UPTOP_DB_TYPE=sqlite
|
||||
- UPTOP_DB_DSN=/data/uptop.db
|
||||
- UPTOP_HTTP_PORT=8080
|
||||
- UPTOP_STATUS_ENABLED=true
|
||||
- UPTOP_STATUS_TITLE=System Status
|
||||
# SSH access: add your public key via env var or authorized_keys file
|
||||
# - UPTOP_ADMIN_KEY=ssh-ed25519 AAAA... you@host
|
||||
volumes:
|
||||
- ./data:/data
|
||||
Reference in New Issue
Block a user