fix: update database environment variables in Dockerfile
Browse files- Add explicit database configuration variables
- Match environment variables with docker-compose.yaml
- Ensure consistency between services
- Dockerfile +13 -6
Dockerfile
CHANGED
|
@@ -195,12 +195,19 @@ ENV FLASK_APP=app.py \
|
|
| 195 |
PYTHONPATH=/app/api \
|
| 196 |
PATH="/usr/local/bin:${PATH}" \
|
| 197 |
STORAGE_DIR=/storage \
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 204 |
|
| 205 |
# Copy entrypoint script
|
| 206 |
COPY docker/entrypoint.sh /app/entrypoint.sh
|
|
|
|
| 195 |
PYTHONPATH=/app/api \
|
| 196 |
PATH="/usr/local/bin:${PATH}" \
|
| 197 |
STORAGE_DIR=/storage \
|
| 198 |
+
# Database configuration
|
| 199 |
+
DB_USERNAME=${DB_USERNAME:-postgres} \
|
| 200 |
+
DB_PASSWORD=${DB_PASSWORD:-difyai123456} \
|
| 201 |
+
DB_HOST=${DB_HOST:-db} \
|
| 202 |
+
DB_PORT=${DB_PORT:-5432} \
|
| 203 |
+
DB_DATABASE=${DB_DATABASE:-dify} \
|
| 204 |
+
SQLALCHEMY_POOL_SIZE=${SQLALCHEMY_POOL_SIZE:-30} \
|
| 205 |
+
SQLALCHEMY_POOL_RECYCLE=${SQLALCHEMY_POOL_RECYCLE:-3600} \
|
| 206 |
+
# Redis configuration
|
| 207 |
+
REDIS_HOST=${REDIS_HOST:-redis} \
|
| 208 |
+
REDIS_PORT=${REDIS_PORT:-6379} \
|
| 209 |
+
REDIS_PASSWORD=${REDIS_PASSWORD:-difyai123456} \
|
| 210 |
+
REDIS_DB=${REDIS_DB:-0}
|
| 211 |
|
| 212 |
# Copy entrypoint script
|
| 213 |
COPY docker/entrypoint.sh /app/entrypoint.sh
|