API port through env variable

This commit is contained in:
Eden Kirin
2023-04-21 12:03:42 +02:00
parent 82259f4522
commit 21a69c7515
2 changed files with 7 additions and 3 deletions

View File

@ -1,5 +1,6 @@
FROM python:3.10.11-alpine3.17
# take arguments
ARG INTERNAL_API_PORT
ARG INTERNAL_WS_PORT
@ -14,7 +15,7 @@ COPY poetry.lock .
# create virtual environment
RUN python -m venv /venv
# set python thingies and activate virtual environment
# set python thingies, set environment variables and activate virtual environment
ENV \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
@ -28,6 +29,7 @@ RUN \
# install python libs
pip install -r requirements.txt --no-cache-dir --prefer-binary
# copy all relevant files
COPY ./.docker/* ./
COPY ./hopper ./hopper
COPY ./main.py .