Add Docker and Traefik compose configuration.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
18
Dockerfile
Normal file
18
Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
||||
FROM python:3.12-alpine
|
||||
|
||||
RUN adduser -D -H app
|
||||
WORKDIR /app
|
||||
|
||||
COPY app/requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY app/ .
|
||||
USER app
|
||||
|
||||
ENV PORT=8080
|
||||
EXPOSE 8080
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
|
||||
CMD wget -qO- http://127.0.0.1:${PORT}/health || exit 1
|
||||
|
||||
CMD ["python", "main.py"]
|
||||
Reference in New Issue
Block a user