- Make app name configurable via APP_NAME env variable - Update UI, HTML, Docker, scripts, and k8s to use APP_NAME - Add process-html.sh for template substitution - Document APP_NAME usage in docs/APP_NAME_CONFIGURATION.md - Update Dockerfile, compose, and scripts for dynamic naming - Add index.html.template for environment-based branding
71 lines
2.0 KiB
YAML
71 lines
2.0 KiB
YAML
services:
|
|
# Frontend service
|
|
frontend:
|
|
build:
|
|
context: ..
|
|
dockerfile: docker/Dockerfile
|
|
args:
|
|
# Application Configuration
|
|
- APP_NAME=${APP_NAME:-RxMinder}
|
|
# CouchDB Configuration
|
|
- VITE_COUCHDB_URL=${VITE_COUCHDB_URL:-http://couchdb:5984}
|
|
- VITE_COUCHDB_USER=${VITE_COUCHDB_USER:-admin}
|
|
- VITE_COUCHDB_PASSWORD=${VITE_COUCHDB_PASSWORD:-change-this-secure-password}
|
|
# Application Configuration
|
|
- APP_BASE_URL=${APP_BASE_URL:-http://localhost:8080}
|
|
# OAuth Configuration (Optional)
|
|
- VITE_GOOGLE_CLIENT_ID=${VITE_GOOGLE_CLIENT_ID:-}
|
|
- VITE_GITHUB_CLIENT_ID=${VITE_GITHUB_CLIENT_ID:-}
|
|
# Build Environment
|
|
- NODE_ENV=${NODE_ENV:-production}
|
|
# Enable buildx for multi-platform builds
|
|
platforms:
|
|
- linux/amd64
|
|
- linux/arm64
|
|
ports:
|
|
- '8080:80'
|
|
depends_on:
|
|
couchdb:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
# Health check for the frontend container
|
|
healthcheck:
|
|
test: ['CMD', 'curl', '-f', 'http://localhost/']
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
labels:
|
|
- 'monitoring=true'
|
|
- 'service=frontend'
|
|
- 'app=${APP_NAME:-meds}'
|
|
|
|
# CouchDB service
|
|
couchdb:
|
|
image: couchdb:3.3.2
|
|
volumes:
|
|
- ./couchdb-data:/opt/couchdb/data
|
|
environment:
|
|
- COUCHDB_USER=${COUCHDB_USER:-admin}
|
|
- COUCHDB_PASSWORD=${COUCHDB_PASSWORD:-change-this-secure-password}
|
|
ports:
|
|
- '5984:5984'
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ['CMD', 'curl', '-f', 'http://localhost:5984/_up']
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
labels:
|
|
- 'monitoring=true'
|
|
- 'service=couchdb'
|
|
- 'app=${APP_NAME:-meds}'
|
|
|
|
# Redis service (commented out as per requirements)
|
|
# redis:
|
|
# image: redis:alpine
|
|
# restart: unless-stopped
|
|
# labels:
|
|
# - "monitoring=true"
|
|
# - "service=redis"
|