- Add ORCHARD_ADMIN_PASSWORD env var to set initial admin password - When set, admin user created without forced password change - Add AWS Secrets Manager support for stage/prod deployments - Add .env file support for local docker development - Add Helm chart auth config (adminPassword, existingSecret, secretsManager) Environments configured: - Local: .env file or defaults to changeme123 - Feature/dev: orchardtest123 (hardcoded in values-dev.yaml) - Stage: AWS Secrets Manager (orchard-stage-creds) - Prod: AWS Secrets Manager (orch-prod-creds)
156 lines
3.7 KiB
YAML
156 lines
3.7 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
orchard-server:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.local
|
|
ports:
|
|
- "0.0.0.0:8080:8080"
|
|
environment:
|
|
- ORCHARD_SERVER_HOST=0.0.0.0
|
|
- ORCHARD_SERVER_PORT=8080
|
|
- ORCHARD_DATABASE_HOST=postgres
|
|
- ORCHARD_DATABASE_PORT=5432
|
|
- ORCHARD_DATABASE_USER=orchard
|
|
- ORCHARD_DATABASE_PASSWORD=orchard_secret
|
|
- ORCHARD_DATABASE_DBNAME=orchard
|
|
- ORCHARD_DATABASE_SSLMODE=disable
|
|
- ORCHARD_S3_ENDPOINT=http://minio:9000
|
|
- ORCHARD_S3_REGION=us-east-1
|
|
- ORCHARD_S3_BUCKET=orchard-artifacts
|
|
- ORCHARD_S3_ACCESS_KEY_ID=minioadmin
|
|
- ORCHARD_S3_SECRET_ACCESS_KEY=minioadmin
|
|
- ORCHARD_S3_USE_PATH_STYLE=true
|
|
- ORCHARD_REDIS_HOST=redis
|
|
- ORCHARD_REDIS_PORT=6379
|
|
# Higher rate limit for local development/testing
|
|
- ORCHARD_LOGIN_RATE_LIMIT=1000/minute
|
|
# Admin password - set in .env file or environment (see .env.example)
|
|
- ORCHARD_ADMIN_PASSWORD=${ORCHARD_ADMIN_PASSWORD:-}
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
minio:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
networks:
|
|
- orchard-network
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
|
|
interval: 30s
|
|
timeout: 3s
|
|
start_period: 10s
|
|
retries: 3
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
cap_drop:
|
|
- ALL
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '1.0'
|
|
memory: 1G
|
|
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
- POSTGRES_USER=orchard
|
|
- POSTGRES_PASSWORD=orchard_secret
|
|
- POSTGRES_DB=orchard
|
|
volumes:
|
|
- postgres-data-local:/var/lib/postgresql/data
|
|
- ./migrations:/docker-entrypoint-initdb.d:ro
|
|
ports:
|
|
- "127.0.0.1:5432:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U orchard -d orchard"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- orchard-network
|
|
restart: unless-stopped
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '0.5'
|
|
memory: 512M
|
|
|
|
minio:
|
|
image: minio/minio:latest
|
|
command: server /data --console-address ":9001"
|
|
environment:
|
|
- MINIO_ROOT_USER=minioadmin
|
|
- MINIO_ROOT_PASSWORD=minioadmin
|
|
volumes:
|
|
- minio-data-local:/data
|
|
ports:
|
|
- "127.0.0.1:9000:9000"
|
|
- "127.0.0.1:9001:9001"
|
|
healthcheck:
|
|
test: ["CMD", "mc", "ready", "local"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- orchard-network
|
|
restart: unless-stopped
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '0.5'
|
|
memory: 512M
|
|
|
|
minio-init:
|
|
image: minio/mc:latest
|
|
depends_on:
|
|
minio:
|
|
condition: service_healthy
|
|
entrypoint: >
|
|
/bin/sh -c "
|
|
mc alias set myminio http://minio:9000 minioadmin minioadmin;
|
|
mc mb myminio/orchard-artifacts --ignore-existing;
|
|
mc anonymous set download myminio/orchard-artifacts;
|
|
exit 0;
|
|
"
|
|
networks:
|
|
- orchard-network
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '0.25'
|
|
memory: 128M
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
command: redis-server --appendonly yes
|
|
volumes:
|
|
- redis-data-local:/data
|
|
ports:
|
|
- "127.0.0.1:6379:6379"
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- orchard-network
|
|
restart: unless-stopped
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '0.25'
|
|
memory: 256M
|
|
|
|
volumes:
|
|
postgres-data-local:
|
|
minio-data-local:
|
|
redis-data-local:
|
|
|
|
networks:
|
|
orchard-network:
|
|
driver: bridge
|