mirror of
https://github.com/wso2/fhir-mcp-server.git
synced 2025-11-14 22:18:14 +03:00
feat: Add docker support
This commit is contained in:
45
.dockerignore
Normal file
45
.dockerignore
Normal file
@@ -0,0 +1,45 @@
|
||||
# Ignore Python cache and build artifacts
|
||||
__pycache__/
|
||||
*.pyc
|
||||
*.pyo
|
||||
*.pyd
|
||||
*.py[co]
|
||||
|
||||
# Ignore virtual environments
|
||||
.venv/
|
||||
venv/
|
||||
ENV/
|
||||
|
||||
# Ignore distribution/build directories
|
||||
build/
|
||||
dist/
|
||||
wheels/
|
||||
*.egg-info/
|
||||
|
||||
# Ignore environment files
|
||||
.env
|
||||
*.env
|
||||
|
||||
# Ignore IDE/editor config
|
||||
.vscode/
|
||||
.idea/
|
||||
|
||||
# Ignore OS files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# Ignore test and coverage outputs
|
||||
.coverage
|
||||
htmlcov/
|
||||
.tox/
|
||||
|
||||
# Ignore git and docker files
|
||||
.git
|
||||
.gitignore
|
||||
.dockerignore
|
||||
|
||||
# Ignore logs
|
||||
*.log
|
||||
|
||||
# Ignore documentation builds
|
||||
docs/_build/
|
||||
27
Dockerfile
Normal file
27
Dockerfile
Normal file
@@ -0,0 +1,27 @@
|
||||
FROM python:3.11-slim
|
||||
|
||||
# Install uv (for fast dependency management)
|
||||
RUN pip install --upgrade pip && pip install uv
|
||||
|
||||
# Set workdir
|
||||
WORKDIR /app
|
||||
|
||||
# Copy only requirements first for better caching
|
||||
COPY requirements.txt ./
|
||||
RUN uv pip sync --system requirements.txt
|
||||
|
||||
# Copy the rest of the code
|
||||
COPY . .
|
||||
|
||||
# Create a non-root user with UID 10001 and switch to it
|
||||
RUN useradd -m -u 10001 appuser
|
||||
USER 10001
|
||||
|
||||
# Expose default port
|
||||
EXPOSE 8000
|
||||
|
||||
# Set environment variables (can be overridden at runtime)
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
# Default command to run the server (can be overridden)
|
||||
CMD ["uv", "run", "fhir-mcp-server", "--disable-mcp-auth"]
|
||||
Reference in New Issue
Block a user