- deploy.sh: idempotent Ubuntu deployment (git pull → docker build →
extract frontend → copy to /var/www/html/ac-helper/ → restart container)
- .env.example: production template with APP_PORT=8100
- docker-compose.yml: port now ${APP_PORT:-8100}:8000, updated proxy
comment to Apache VirtualHost snippet
- .gitignore: whitelist .env.example
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
71 lines
2.2 KiB
YAML
71 lines
2.2 KiB
YAML
# Apache reverse proxy config (add inside your VirtualHost block):
|
|
#
|
|
# # Required modules: a2enmod proxy proxy_http proxy_wstunnel
|
|
#
|
|
# # Proxy API requests to the Docker container
|
|
# <Location /ac-helper/api/>
|
|
# ProxyPass http://localhost:8100/api/
|
|
# ProxyPassReverse http://localhost:8100/api/
|
|
# </Location>
|
|
#
|
|
# # Proxy WebSocket
|
|
# ProxyPass /ac-helper/ws ws://localhost:8100/ws
|
|
# ProxyPassReverse /ac-helper/ws ws://localhost:8100/ws
|
|
#
|
|
# # Serve frontend static files directly from disk
|
|
# Alias /ac-helper/ /var/www/html/ac-helper/
|
|
# <Directory /var/www/html/ac-helper>
|
|
# Options -Indexes
|
|
# AllowOverride None
|
|
# Require all granted
|
|
# FallbackResource /ac-helper/index.html
|
|
# </Directory>
|
|
#
|
|
# Apache serves static files; Docker handles /api and /ws only.
|
|
# APP_PORT in .env controls the host port (default: 8100).
|
|
|
|
version: '3.9'
|
|
|
|
services:
|
|
app:
|
|
build: .
|
|
container_name: ac-tool
|
|
restart: unless-stopped
|
|
ports:
|
|
- "${APP_PORT:-8100}:8000"
|
|
volumes:
|
|
- ./data:/app/data
|
|
environment:
|
|
# Auth
|
|
AZURE_TENANT_ID: ${AZURE_TENANT_ID:-e519c2e6-bc6d-4fdf-8d9c-923c2f002385}
|
|
AZURE_CLIENT_ID: ${AZURE_CLIENT_ID:-9079054c-9620-4757-a256-23413042f1ef}
|
|
AZURE_REDIRECT_URI: ${AZURE_REDIRECT_URI:-https://ai-sandbox.oliver.solutions/ac-helper/}
|
|
|
|
# Dev mode (set to false in production)
|
|
DEV_MODE: ${DEV_MODE:-false}
|
|
DEV_USER_ID: ${DEV_USER_ID:-dev-user-001}
|
|
DEV_USER_ROLE: ${DEV_USER_ROLE:-admin}
|
|
|
|
# Admin bootstrap
|
|
ADMIN_EMAIL: ${ADMIN_EMAIL:-daveporter@oliver.agency}
|
|
|
|
# AI providers
|
|
GEMINI_API_KEY: ${GEMINI_API_KEY}
|
|
OPENAI_API_KEY: ${OPENAI_API_KEY:-}
|
|
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY:-}
|
|
LLAMA_CLOUD_API_KEY: ${LLAMA_CLOUD_API_KEY:-}
|
|
|
|
# Paths
|
|
DATA_DIR: /app/data
|
|
UPLOADS_DIR: /app/data/uploads
|
|
OUTPUTS_DIR: /app/data/outputs
|
|
SHEETS_DIR: /app/data/sheets
|
|
USERS_FILE: /app/data/users.json
|
|
DROPDOWNS_FILE: /app/data/dropdowns.json
|
|
|
|
healthcheck:
|
|
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 20s
|