@@ -9,10 +9,6 @@ services:
99 container_name : postgres
1010 env_file :
1111 - .env.development
12- environment :
13- POSTGRES_DB : ${POSTGRES_DB:-spending-monitor}
14- POSTGRES_USER : ${POSTGRES_USER:-user}
15- POSTGRES_PASSWORD : ${POSTGRES_PASSWORD:-password}
1612 ports :
1713 - " ${DB_PORT:-5432}:5432"
1814 volumes :
@@ -54,9 +50,8 @@ services:
5450 platform : linux/amd64
5551 container_name : spending-monitor-keycloak-setup
5652 working_dir : /app
57- environment :
58- - KEYCLOAK_URL=http://keycloak:8080
59- - DATABASE_URL=postgresql+asyncpg://user:password@postgres:5432/spending-monitor
53+ env_file :
54+ - .env.development
6055 volumes :
6156 - ./packages/auth/scripts:/app/scripts
6257 - ./data:/app/data
@@ -69,7 +64,7 @@ services:
6964 echo 'Keycloak port is open, waiting 20 more seconds for full startup...' &&
7065 sleep 20 &&
7166 pip install --quiet requests sqlalchemy asyncpg psycopg2-binary pyyaml &&
72- python /app/scripts/setup_keycloak .py
67+ python /app/scripts/setup_keycloak_with_db_users .py
7368 "
7469 depends_on :
7570 - keycloak
@@ -113,30 +108,8 @@ services:
113108 container_name : spending-monitor-api
114109 env_file :
115110 - .env.development
116- environment :
117- - DATABASE_URL=${DATABASE_URL:-postgresql+asyncpg://user:password@postgres:5432/spending-monitor}
118- - SMTP_HOST=${SMTP_HOST:-smtp4dev}
119- - SMTP_PORT=${SMTP_PORT:-25}
120- - SMTP_USERNAME=${SMTP_USERNAME:-}
121- - SMTP_PASSWORD=${SMTP_PASSWORD:-}
122- - SMTP_FROM_EMAIL=${SMTP_FROM_EMAIL:-spending-monitor@localhost}
123- - SMTP_USE_TLS=${SMTP_USE_TLS:-false}
124- - SMTP_USE_SSL=${SMTP_USE_SSL:-false}
125- - ENVIRONMENT=${ENVIRONMENT:-development}
126- - BYPASS_AUTH=${BYPASS_AUTH:-false}
127- - API_PORT=${API_PORT:-8000}
128- - CORS_ALLOWED_ORIGINS=${CORS_ALLOWED_ORIGINS:-http://localhost:3000,http://localhost:8080}
129- - ALLOWED_ORIGINS=${ALLOWED_ORIGINS:-http://localhost:3000,http://localhost:8080}
130- - ALLOWED_HOSTS=${ALLOWED_HOSTS:-http://localhost:5173}
131- - BASE_URL=${BASE_URL:-https://api.openai.com/v1}
132- - API_KEY=${API_KEY:-your-openai-api-key-here}
133- - MODEL=${MODEL:-gpt-3.5-turbo}
134- - LLAMASTACK_BASE_URL=${LLAMASTACK_BASE_URL:-http://llamastack:8321}
135- - LLM_PROVIDER=${LLM_PROVIDER:-openai}
136- - NODE_ENV=${NODE_ENV:-development}
137- - KEYCLOAK_URL=${KEYCLOAK_URL:-http://keycloak:8080}
138- - KEYCLOAK_REALM=${KEYCLOAK_REALM:-spending-monitor}
139- - KEYCLOAK_CLIENT_ID=${KEYCLOAK_CLIENT_ID:-spending-monitor}
111+
112+
140113 ports :
141114 - " 8000:8000"
142115 depends_on :
@@ -165,13 +138,6 @@ services:
165138 - api
166139 networks :
167140 - spending-monitor
168- environment :
169- - VITE_API_BASE_URL=${VITE_API_BASE_URL:-/api}
170- - VITE_BYPASS_AUTH=${VITE_BYPASS_AUTH:-false}
171- - VITE_ENVIRONMENT=${VITE_ENVIRONMENT:-staging}
172- # UI needs public Keycloak URL (accessible from browser), not internal container hostname
173- - VITE_KEYCLOAK_URL=${VITE_KEYCLOAK_URL:-http://localhost:8080/realms/spending-monitor}
174- - VITE_KEYCLOAK_CLIENT_ID=${VITE_KEYCLOAK_CLIENT_ID:-spending-monitor}
175141
176142 # Nginx reverse proxy to serve UI and proxy API
177143 nginx :
0 commit comments