deploy-stack 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/utils/warnings.js
CHANGED
|
@@ -14,7 +14,11 @@ export function getFrameworkWarning(frameworkId) {
|
|
|
14
14
|
color.yellow('\n 1. Ensure your package.json has a "start" script (e.g., "start": "node index.js").') +
|
|
15
15
|
color.yellow('\n 2. Your app must listen on 0.0.0.0 (not localhost) to receive traffic in Docker.\n\n')
|
|
16
16
|
);
|
|
17
|
-
|
|
17
|
+
case 'python':
|
|
18
|
+
return color.yellow(' ⚠️ IMPORTANT: PYTHON SETUP REQUIRED ') +
|
|
19
|
+
color.yellow('\n 1. Ensure your requirements.txt includes your web framework (e.g., fastapi, uvicorn).') +
|
|
20
|
+
color.yellow('\n 2. Your app must listen on 0.0.0.0 (not localhost) to receive traffic in Docker.') +
|
|
21
|
+
color.yellow('\n 3. Ensure your app has a health check route returning 200 OK.\n\n');
|
|
18
22
|
default:
|
|
19
23
|
return '';
|
|
20
24
|
}
|
|
@@ -1,7 +1,26 @@
|
|
|
1
1
|
FROM python:3.11-slim
|
|
2
|
+
|
|
3
|
+
# Prevent Python from writing .pyc files and buffer stdout for cleaner logs
|
|
4
|
+
ENV PYTHONDONTWRITEBYTECODE=1
|
|
5
|
+
ENV PYTHONUNBUFFERED=1
|
|
6
|
+
|
|
2
7
|
WORKDIR /app
|
|
8
|
+
|
|
9
|
+
# Create a non-root user for security compliance
|
|
10
|
+
RUN adduser --disabled-password --gecos '' appuser
|
|
11
|
+
|
|
12
|
+
# Install dependencies without caching to keep the image size small
|
|
3
13
|
COPY requirements.txt .
|
|
4
|
-
RUN pip install -r requirements.txt
|
|
14
|
+
RUN pip install --no-cache-dir -r requirements.txt
|
|
15
|
+
|
|
5
16
|
COPY . .
|
|
17
|
+
|
|
18
|
+
# Secure file permissions
|
|
19
|
+
RUN chown -R appuser:appuser /app
|
|
20
|
+
|
|
21
|
+
# Drop root privileges
|
|
22
|
+
USER appuser
|
|
23
|
+
|
|
6
24
|
EXPOSE {{PORT}}
|
|
25
|
+
|
|
7
26
|
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "{{PORT}}"]
|