Austin Vance commited on
Commit
6b2f578
·
1 Parent(s): 892bfa7

allow port to come from env

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -2
Dockerfile CHANGED
@@ -1,5 +1,7 @@
1
  FROM python:3.11-slim
2
 
 
 
3
  RUN apt update && apt install -y libpq-dev
4
 
5
  RUN pip install poetry==1.6.1
@@ -20,6 +22,6 @@ COPY ./app ./app
20
 
21
  RUN poetry install --no-interaction --no-ansi
22
 
23
- EXPOSE 8080
24
 
25
- CMD exec uvicorn app.server:app --host 0.0.0.0 --port 8080
 
1
  FROM python:3.11-slim
2
 
3
+ ENV PORT 8080
4
+
5
  RUN apt update && apt install -y libpq-dev
6
 
7
  RUN pip install poetry==1.6.1
 
22
 
23
  RUN poetry install --no-interaction --no-ansi
24
 
25
+ EXPOSE $PORT
26
 
27
+ CMD exec uvicorn app.server:app --host 0.0.0.0 --port $PORT