Skip to content

Commit bf2c1c6

Browse files
committed
Make Dockerfile PORT configurable for Railway compatibility
1 parent 7a1e439 commit bf2c1c6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ FROM python:3.12-slim
1919
WORKDIR /app
2020
ENV PATH="/app/.venv/bin:$PATH" \
2121
PYTHONDONTWRITEBYTECODE=1 \
22-
PYTHONUNBUFFERED=1
22+
PYTHONUNBUFFERED=1 \
23+
PORT=5000
2324

2425
# Install runtime deps and create user
2526
RUN apt-get update && apt-get install -y --no-install-recommends curl libexpat1 \
@@ -38,4 +39,4 @@ USER enferno
3839
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
3940
CMD curl -f http://localhost:5000/ || exit 1
4041

41-
CMD ["uwsgi", "--http", "0.0.0.0:5000", "--master", "--wsgi", "run:app", "--processes", "2", "--threads", "2"]
42+
CMD uwsgi --http 0.0.0.0:$PORT --master --wsgi run:app --processes 2 --threads 2

0 commit comments

Comments
 (0)