Spaces:
Sleeping
Sleeping
Update default PORT to 7860 in Dockerfile, scripts, and tests
Browse files- Dockerfile +1 -1
- TECHNICAL.md +1 -1
- api/index.py +1 -1
- tests/run_tests.sh +2 -2
- tests/test_api.py +1 -1
Dockerfile
CHANGED
@@ -23,7 +23,7 @@ COPY requirements.txt .
|
|
23 |
|
24 |
# Install Python dependencies
|
25 |
RUN pip install --no-cache-dir --upgrade pip && \
|
26 |
-
pip install --no-cache-dir -r requirements.txt
|
27 |
|
28 |
# Copy application code
|
29 |
COPY ./api ./api
|
|
|
23 |
|
24 |
# Install Python dependencies
|
25 |
RUN pip install --no-cache-dir --upgrade pip && \
|
26 |
+
pip install --no-cache-dir --root-user-action=ignore -r requirements.txt
|
27 |
|
28 |
# Copy application code
|
29 |
COPY ./api ./api
|
TECHNICAL.md
CHANGED
@@ -55,7 +55,7 @@ This document provides comprehensive technical information about the Stock Monit
|
|
55 |
API_KEY=your_secure_api_key_here
|
56 |
|
57 |
# Optional: Server Configuration
|
58 |
-
PORT=
|
59 |
```
|
60 |
|
61 |
5. **Database Setup:**
|
|
|
55 |
API_KEY=your_secure_api_key_here
|
56 |
|
57 |
# Optional: Server Configuration
|
58 |
+
PORT=7860
|
59 |
```
|
60 |
|
61 |
5. **Database Setup:**
|
api/index.py
CHANGED
@@ -1301,7 +1301,7 @@ if __name__ == "__main__":
|
|
1301 |
import uvicorn
|
1302 |
|
1303 |
HOST = os.getenv("HOST", "0.0.0.0")
|
1304 |
-
PORT = int(os.getenv("PORT",
|
1305 |
|
1306 |
# Determina el valor de reload según la variable de entorno PROD
|
1307 |
RELOAD = os.getenv("PROD", "False") != "True"
|
|
|
1301 |
import uvicorn
|
1302 |
|
1303 |
HOST = os.getenv("HOST", "0.0.0.0")
|
1304 |
+
PORT = int(os.getenv("PORT", 7860))
|
1305 |
|
1306 |
# Determina el valor de reload según la variable de entorno PROD
|
1307 |
RELOAD = os.getenv("PROD", "False") != "True"
|
tests/run_tests.sh
CHANGED
@@ -19,8 +19,8 @@ else
|
|
19 |
echo "⚠️ .env file not found, using default values"
|
20 |
fi
|
21 |
|
22 |
-
# Use PORT from .env or default to
|
23 |
-
PORT=${PORT:-
|
24 |
echo "🔧 Using PORT: $PORT"
|
25 |
|
26 |
# Check if server is running
|
|
|
19 |
echo "⚠️ .env file not found, using default values"
|
20 |
fi
|
21 |
|
22 |
+
# Use PORT from .env or default to 7860
|
23 |
+
PORT=${PORT:-7860}
|
24 |
echo "🔧 Using PORT: $PORT"
|
25 |
|
26 |
# Check if server is running
|
tests/test_api.py
CHANGED
@@ -17,7 +17,7 @@ from dotenv import load_dotenv
|
|
17 |
|
18 |
# Load environment variables from parent directory
|
19 |
load_dotenv(dotenv_path="../.env")
|
20 |
-
PORT = os.getenv("PORT", "
|
21 |
print(f"Using PORT: {PORT}")
|
22 |
|
23 |
|
|
|
17 |
|
18 |
# Load environment variables from parent directory
|
19 |
load_dotenv(dotenv_path="../.env")
|
20 |
+
PORT = os.getenv("PORT", "7860")
|
21 |
print(f"Using PORT: {PORT}")
|
22 |
|
23 |
|