Working site
This commit is contained in:
@@ -1,14 +1,23 @@
|
||||
FROM python:3.9
|
||||
ENV PYTHONFAULTHANDLER=1
|
||||
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
ENV MODE="LOCAL"
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install Chrony (modern NTP implementation)
|
||||
RUN apt-get update && apt-get install -y chrony
|
||||
|
||||
# Configure Chrony NTP servers
|
||||
RUN echo "server time.nist.gov iburst" >> /etc/chrony/chrony.conf
|
||||
RUN echo "server pool.ntp.org iburst" >> /etc/chrony/chrony.conf
|
||||
|
||||
# Copy and install Python dependencies
|
||||
COPY requirements.txt requirements.txt
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
# Copy source code
|
||||
COPY . .
|
||||
|
||||
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
# Start Chrony service and then run the application
|
||||
CMD chronyd -d && uvicorn app.main:app --host 0.0.0.0 --port 8000
|
||||
|
||||
Reference in New Issue
Block a user