.aizen_sama
.aizen_sama
RRailway
Created by .aizen_sama on 6/20/2023 in #✋|help
not able to access PORT environment variable in dockerfile
Dockerfile code is written below and railway deploy logs display an error saying $PORT is not a valid integer thereby meaning that port variable is not read. FROM python:3.10 WORKDIR /code COPY ./requirements.txt /code/requirements.txt RUN pip install --no-cache-dir --upgrade -r ./requirements.txt COPY ./app /code/app ARG PORT ENV PORT=$PORT CMD [ "uvicorn", "app.main:app", "--host", "0.0.0.0" , "--port" , "$PORT" ]
14 replies