- Frontend Fixes:
- Correct import paths for `useToast` hook in `WebhooksPage.tsx` and `AdminDashboardPage.tsx` (camelCase vs kebab-case).
- Update `WebhooksPage.tsx` to use the existing custom `Dialog` component API instead of non-existent composed components.
- Backend Fixes:
- Remove explicit transaction blocks from `011_cleanup_refresh_tokens.sql` to avoid conflict with migration runner's transaction handling.
- Configuration:
- Create `.env` file with production configuration for local testing.
- Fix Nginx configuration in `apps/web/nginx.conf`:
- Use resolver and variables for upstream proxies to ensure frontend starts even if backends are down.
- Fix stream server proxy path to route `/stream` to `/ws`.
- Fix `docker-compose.production.yml` to use correct `Dockerfile` for stream server.
- Add `docker-compose.hybrid.yml` to support running infrastructure (DBs) in Docker with `network_mode: host` while running apps natively (bypassing Docker build rate limits).
91 lines
2.3 KiB
YAML
91 lines
2.3 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:15-alpine
|
|
container_name: veza-postgres-prod
|
|
environment:
|
|
POSTGRES_DB: ${POSTGRES_DB}
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
POSTGRES_INITDB_ARGS: "-E UTF8 --locale=C"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- ./scripts/database/backup:/backup:ro
|
|
network_mode: host
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 30s
|
|
restart: unless-stopped
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: veza-redis-prod
|
|
command: >
|
|
redis-server
|
|
--requirepass ${REDIS_PASSWORD}
|
|
--appendonly yes
|
|
--appendfsync everysec
|
|
--maxmemory 256mb
|
|
--maxmemory-policy allkeys-lru
|
|
volumes:
|
|
- redis_data:/data
|
|
network_mode: host
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD}", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 30s
|
|
restart: unless-stopped
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
prometheus:
|
|
image: prom/prometheus:latest
|
|
container_name: veza-prometheus
|
|
volumes:
|
|
- ./config/prometheus.yml:/etc/prometheus/prometheus.yml
|
|
- prometheus_data:/prometheus
|
|
command:
|
|
- '--config.file=/etc/prometheus/prometheus.yml'
|
|
- '--storage.tsdb.path=/prometheus'
|
|
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
|
|
- '--web.console.templates=/usr/share/prometheus/consoles'
|
|
network_mode: host
|
|
restart: unless-stopped
|
|
|
|
grafana:
|
|
image: grafana/grafana:latest
|
|
container_name: veza-grafana
|
|
volumes:
|
|
- grafana_data:/var/lib/grafana
|
|
- ./config/grafana:/etc/grafana/provisioning
|
|
environment:
|
|
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD:-admin}
|
|
- GF_USERS_ALLOW_SIGN_UP=false
|
|
network_mode: host
|
|
depends_on:
|
|
- prometheus
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
postgres_data:
|
|
driver: local
|
|
redis_data:
|
|
driver: local
|
|
prometheus_data:
|
|
driver: local
|
|
grafana_data:
|
|
driver: local
|