mirror of
https://github.com/michivonah/bbzw-horizon.git
synced 2025-12-22 17:16:27 +01:00
30 lines
No EOL
604 B
Text
30 lines
No EOL
604 B
Text
FROM python:3.12
|
|
|
|
# Create directory
|
|
RUN mkdir app
|
|
WORKDIR /app/
|
|
|
|
# Copy files
|
|
COPY requirements.txt .
|
|
|
|
# Set enviromental variables
|
|
ENV DB_CONNECTION_STRING=ep-plannerDB
|
|
|
|
# Install needed packages
|
|
RUN pip3 install --upgrade pip
|
|
RUN pip3 install pipenv
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Expose port
|
|
EXPOSE 8443
|
|
|
|
# Imort script
|
|
COPY webservice.py .
|
|
COPY crypto.py .
|
|
COPY dbfunctions.py .
|
|
COPY models.py .
|
|
COPY certs/key.pem .
|
|
COPY certs/cert.pem .
|
|
|
|
# Start app
|
|
CMD ["uvicorn", "webservice:app", "--host", "0.0.0.0", "--port", "8443", "--ssl-keyfile=key.pem", "--ssl-certfile=cert.pem"] |