Added port via env

This commit is contained in:
kevinveenbirkenbach committed 2025-07-05 09:32:07 +02:00
1 parent 4d68ed2a24
commit 1bea9703ea
5 files changed
+19 -8

No files matched your search

+7 -4
View File
@@ -11,8 +11,11 @@ RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY app/ .
# Expose port
EXPOSE 5000
# Set default port environment variable
ENV PORT=5000
# Start command
CMD ["python", "app.py"]
# Expose port (optional for documentation)
EXPOSE ${PORT}
# Start command using shell to allow env substitution
CMD ["sh", "-c", "exec python app.py --port=${PORT}"]