Initial import of Microtracking project
This commit is contained in:
commit
60720c388c
2265 files changed
+1464696
No files matched your search
@@ -0,0 +1,25 @@
|
||||
FROM python:3.11-slim
|
||||
|
||||
ENV TZ=Etc/GMT+6
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends tzdata \
|
||||
&& ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \
|
||||
&& echo $TZ > /etc/timezone \
|
||||
&& rm -rf /var/lib/apt-get/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt /app/requirements.txt
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copiar el paquete modular
|
||||
COPY app /app/app
|
||||
COPY static /app/static
|
||||
|
||||
RUN mkdir -p /app/data_logs /app/firmware /app/state
|
||||
VOLUME ["/app/data_logs", "/app/firmware", "/app/state"]
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
# Socket ownership is in memory; multiple workers need an external coordinator.
|
||||
HEALTHCHECK --interval=10s --timeout=3s --start-period=10s --retries=3 CMD ["python", "-c", "import json,urllib.request; raise SystemExit(not json.load(urllib.request.urlopen('http://127.0.0.1:8000/health',timeout=2))['ok'])"]
|
||||
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "1", "--ws-max-size", "16384"]
|
||||
Reference in new issue
Block a user