mirror of
https://github.com/creyD/email_valid.git
synced 2026-04-12 19:30:30 +02:00
feat: added docker config
This commit is contained in:
25
Dockerfile
Normal file
25
Dockerfile
Normal file
@@ -0,0 +1,25 @@
|
||||
FROM python:3.13-slim
|
||||
ARG VERSION=unkown
|
||||
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
|
||||
# Python setup
|
||||
ENV PYTHONDONTWRITEBYTECODE 1
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
ENV VERSION=${VERSION}
|
||||
|
||||
# Install dependencies
|
||||
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
||||
RUN pip install 'uvicorn[standard]'
|
||||
|
||||
ENV ENV=DEV
|
||||
|
||||
EXPOSE 8000
|
||||
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
|
||||
# Install curl
|
||||
RUN apt-get update && apt-get install -y curl && apt-get clean
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=10s --retries=5 \
|
||||
CMD curl --fail http://localhost:8000/openapi.json || exit 1
|
||||
Reference in New Issue
Block a user