-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (23 loc) · 891 Bytes
/
Copy pathDockerfile
File metadata and controls
32 lines (23 loc) · 891 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM python:3.11-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libffi-dev \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
# Install poetry
RUN pip install --no-cache-dir poetry
# Copy project files
COPY pyproject.toml poetry.lock* README.md ./
# Install dependencies
RUN poetry config virtualenvs.create false \
&& poetry install --no-interaction --no-ansi --no-root
# Copy application code
COPY . .
# Expose ZMQ ports (CA listener + registration listener)
EXPOSE 5000 5001
HEALTHCHECK --interval=10s --timeout=5s --start-period=30s --retries=10 \
CMD python -c "import socket; s=socket.socket(); s.settimeout(2); s.connect(('127.0.0.1', 5000)); s.close()"
# Default command: auto-bootstrap (init on first boot) + run both listeners
CMD ["python", "ca_server.py", "start"]