-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-env-example
More file actions
135 lines (118 loc) · 4.6 KB
/
docker-env-example
File metadata and controls
135 lines (118 loc) · 4.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# Docker Environment Configuration Example
# Copy this file to .env and adjust the values as needed
# ============================================
# Frontend Configuration
# ============================================
# Use Docker service names for container-to-container communication
VITE_API_SERVER_URL=http://api_server:2030
VITE_AI_SERVER_URL=http://ai_server:9999
FRONTEND_PORT=5173
# ============================================
# API Server Configuration
# ============================================
API_SERVER_HOST=0.0.0.0
API_SERVER_PORT=2030
API_SERVER_READ_TIMEOUT=60
STATUS_DEV=dev
# ============================================
# AI Server Configuration
# ============================================
AI_SERVER_HOST=0.0.0.0
AI_SERVER_PORT=9999
# ============================================
# Redis Configuration
# ============================================
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_DB=0
# ============================================
# Kafka Configuration
# ============================================
KAFKA_PORT=9092
KAFKA_BOOTSTRAP_SERVERS=kafka:9093
KAFKA_GROUP_ID=vrecom_ai_server_group
# ============================================
# Kafka UI Configuration
# ============================================
KAFKA_UI_PORT=8080
# ============================================
# Prometheus Configuration
# ============================================
PROMETHEUS_PORT=9090
# ============================================
# Database Configuration (MySQL)
# ============================================
MYSQL_HOST=mysql
MYSQL_PORT=3306
MYSQL_USER=admin
MYSQL_PASSWORD=pokiwar0981
MYSQL_DATABASE=shop
# ============================================
# MongoDB Configuration
# ============================================
MONGODB_HOST=mongodb
MONGODB_PORT=27017
MONGODB_USERNAME=root
MONGODB_PASSWORD=password
# ============================================
# JWT & Session Configuration
# ============================================
JWT_SECRET_KEY=your-super-secret-jwt-key-change-in-production
SESSION_SECRET=your-super-secret-session-key-change-in-production
# ============================================
# Google OAuth Configuration
# ============================================
# Get credentials from: https://console.cloud.google.com/apis/credentials
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
# Local callback URL (for localhost access)
GOOGLE_CALLBACK_URL=http://localhost:2030/api/v1/auth/google/callback
# Public callback URL (for LAN/ngrok access - OPTIONAL)
# If set, the system will automatically detect and use the appropriate URL
# Example with ngrok: https://abc123.ngrok-free.app/api/v1/auth/google/callback
GOOGLE_CALLBACK_URL_PUBLIC=
# ============================================
# Server URLs (Internal Docker Communication)
# ============================================
AI_SERVER_URL=http://ai_server:9999
# ============================================
# Resource Limits (configured in docker-compose.yml)
# ============================================
# Default total RAM usage: ~5.5GB (can be adjusted in docker-compose.yml)
#
# Service | CPU Limit | RAM Limit | RAM Reserved
# -----------------|-----------|-----------|-------------
# redis | 0.5 | 512MB | 128MB
# zookeeper | 0.5 | 512MB | 128MB
# kafka | 1.0 | 1GB | 256MB
# kafka-ui | 0.5 | 512MB | 128MB
# api_server (Go) | 1.0 | 512MB | 128MB
# ai_server (Py) | 2.0 | 2GB | 512MB
# prometheus | 0.5 | 512MB | 128MB
# frontend | 0.5 | 256MB | 64MB
#
# If your machine has limited RAM, you can reduce limits in docker-compose.yml
# ============================================
# Build Optimization
# ============================================
# To optimize build speed, enable Docker BuildKit:
# export DOCKER_BUILDKIT=1
#
# Or add to your .bashrc / .zshrc:
# echo 'export DOCKER_BUILDKIT=1' >> ~/.bashrc
#
# Windows PowerShell:
# $env:DOCKER_BUILDKIT=1
#
# Build with efficient caching:
# docker-compose build --parallel
# ============================================
# Notes
# ============================================
# - Use service names (api_server, ai_server, redis, etc.) for Docker networking
# - Do not use localhost or 127.0.0.1 for container-to-container communication
# - Ports are exposed to the host machine for external access
# - Change JWT_SECRET_KEY and SESSION_SECRET for production
# - Dockerfiles have been optimized with multi-stage builds to reduce image size
# - Dependencies are cached separately to speed up rebuilds when only source code changes