1 parent
5b22add1f3
commit
2c98b8f925
38 files changed
+915
-87
No files matched your search
@@ -0,0 +1,157 @@
|
||||
name: rustbox-ha
|
||||
|
||||
x-rustbox-common: &rustbox-common
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: docker/Dockerfile
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
valkey:
|
||||
condition: service_healthy
|
||||
garage-init:
|
||||
condition: service_completed_successfully
|
||||
opensearch:
|
||||
condition: service_healthy
|
||||
environment: &rustbox-environment
|
||||
RUSTBOX_CONFIG: /etc/rustbox/rustbox.toml
|
||||
ENVIRONMENT: ${ENVIRONMENT:-development}
|
||||
HOST: 0.0.0.0
|
||||
PORT: 3001
|
||||
IMAP_HOST: ${IMAP_HOST:-mail.example.com}
|
||||
IMAP_PORT: ${IMAP_PORT:-993}
|
||||
SMTP_HOST: ${SMTP_HOST:-mail.example.com}
|
||||
SMTP_PORT: ${SMTP_PORT:-587}
|
||||
TLS_ENABLED: ${TLS_ENABLED:-true}
|
||||
RUST_LOG: ${RUST_LOG:-info}
|
||||
DATABASE_URL: postgres://rustbox:${POSTGRES_PASSWORD:-rustbox-dev-password}@postgres:5432/rustbox
|
||||
SESSION_ENCRYPTION_KEY: ${SESSION_ENCRYPTION_KEY:-MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWY=}
|
||||
AWS_ACCESS_KEY_ID: ${GARAGE_ACCESS_KEY_ID:-GKb69252a3b0643e8bd08d4cd4}
|
||||
AWS_SECRET_ACCESS_KEY: ${GARAGE_SECRET_ACCESS_KEY:-9115be9c9e4994306a4176543b0db461f4eb04c5c8a388676d1b57392d0f4e93}
|
||||
SIEVE_ENABLED: ${SIEVE_ENABLED:-false}
|
||||
DIAGNOSTICS_ENABLED: ${DIAGNOSTICS_ENABLED:-true}
|
||||
ABOUT_ENABLED: ${ABOUT_ENABLED:-true}
|
||||
SECURITY_HEADERS_ENABLED: ${SECURITY_HEADERS_ENABLED:-false}
|
||||
volumes:
|
||||
- ./configs/ha-garage.toml:/etc/rustbox/rustbox.toml:ro
|
||||
expose:
|
||||
- "3001"
|
||||
networks:
|
||||
- rustbox-ha
|
||||
restart: unless-stopped
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:17-bookworm
|
||||
environment:
|
||||
POSTGRES_DB: rustbox
|
||||
POSTGRES_USER: rustbox
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-rustbox-dev-password}
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U rustbox -d rustbox"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 20
|
||||
volumes:
|
||||
- postgres-ha-data:/var/lib/postgresql/data
|
||||
networks:
|
||||
- rustbox-ha
|
||||
|
||||
valkey:
|
||||
image: valkey/valkey:9.1.3-alpine
|
||||
command: ["valkey-server", "--appendonly", "yes"]
|
||||
healthcheck:
|
||||
test: ["CMD", "valkey-cli", "ping"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 20
|
||||
volumes:
|
||||
- valkey-data:/data
|
||||
networks:
|
||||
- rustbox-ha
|
||||
|
||||
opensearch:
|
||||
image: opensearchproject/opensearch:3.9.0
|
||||
environment:
|
||||
discovery.type: single-node
|
||||
DISABLE_INSTALL_DEMO_CONFIG: "true"
|
||||
DISABLE_SECURITY_PLUGIN: "true"
|
||||
OPENSEARCH_JAVA_OPTS: -Xms512m -Xmx512m
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -fsS http://localhost:9200/_cluster/health >/dev/null || exit 1"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 30
|
||||
volumes:
|
||||
- opensearch-ha-data:/usr/share/opensearch/data
|
||||
networks:
|
||||
- rustbox-ha
|
||||
|
||||
garage:
|
||||
image: dxflrs/garage:v2.5.0
|
||||
environment:
|
||||
RUST_LOG: ${GARAGE_RUST_LOG:-info}
|
||||
command: ["/garage", "-c", "/etc/garage.toml", "server"]
|
||||
healthcheck:
|
||||
test: ["CMD", "/garage", "-c", "/etc/garage.toml", "status"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 30
|
||||
volumes:
|
||||
- ./garage/garage.toml:/etc/garage.toml:ro
|
||||
- garage-meta:/var/lib/garage/meta
|
||||
- garage-data:/var/lib/garage/data
|
||||
networks:
|
||||
rustbox-ha:
|
||||
ipv4_address: 172.28.80.10
|
||||
|
||||
garage-init:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: docker/garage/init/Dockerfile
|
||||
depends_on:
|
||||
garage:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
GARAGE_ACCESS_KEY_ID: ${GARAGE_ACCESS_KEY_ID:-GKb69252a3b0643e8bd08d4cd4}
|
||||
GARAGE_SECRET_ACCESS_KEY: ${GARAGE_SECRET_ACCESS_KEY:-9115be9c9e4994306a4176543b0db461f4eb04c5c8a388676d1b57392d0f4e93}
|
||||
GARAGE_BUCKET: rustbox
|
||||
GARAGE_CAPACITY: ${GARAGE_CAPACITY:-10G}
|
||||
volumes:
|
||||
- ./garage/garage.toml:/etc/garage.toml:ro
|
||||
- garage-meta:/var/lib/garage/meta
|
||||
- garage-data:/var/lib/garage/data
|
||||
networks:
|
||||
- rustbox-ha
|
||||
|
||||
rustbox-1:
|
||||
<<: *rustbox-common
|
||||
|
||||
rustbox-2:
|
||||
<<: *rustbox-common
|
||||
|
||||
envoy:
|
||||
image: envoyproxy/envoy:v1.40.2
|
||||
depends_on:
|
||||
- rustbox-1
|
||||
- rustbox-2
|
||||
ports:
|
||||
- "${PORT:-3001}:8080"
|
||||
volumes:
|
||||
- ./envoy/envoy.yaml:/etc/envoy/envoy.yaml:ro
|
||||
networks:
|
||||
- rustbox-ha
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
postgres-ha-data:
|
||||
valkey-data:
|
||||
opensearch-ha-data:
|
||||
garage-meta:
|
||||
garage-data:
|
||||
|
||||
networks:
|
||||
rustbox-ha:
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 172.28.80.0/24
|
||||
Reference in new issue
Block a user