mirror of
https://github.com/Sudo-JHare/FHIRFLARE-IG-Toolkit.git
synced 2025-09-17 18:35:02 +00:00
63 lines
2.0 KiB
Docker
63 lines
2.0 KiB
Docker
# Base image with Python and Dotnet
|
|
FROM mcr.microsoft.com/dotnet/sdk:9.0
|
|
|
|
# Install build dependencies, Node.js 18, and coreutils (for stdbuf)
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
python3 python3-pip python3-venv curl coreutils git \
|
|
&& curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
|
|
&& apt-get install -y --no-install-recommends nodejs \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install specific versions of GoFSH and SUSHI
|
|
RUN npm install -g gofsh fsh-sushi
|
|
|
|
# ADDED: Download the latest HL7 FHIR Validator CLI
|
|
RUN mkdir -p /app/validator_cli
|
|
WORKDIR /app/validator_cli
|
|
# Download the validator JAR and a separate checksum file for verification
|
|
RUN curl -L -o validator_cli.jar "https://github.com/hapifhir/org.hl7.fhir.core/releases/latest/download/validator_cli.jar"
|
|
|
|
# Set permissions for the downloaded file
|
|
RUN chmod 755 validator_cli.jar
|
|
|
|
# Change back to the main app directory for the next steps
|
|
WORKDIR /app
|
|
# Set up Python environment
|
|
RUN python3 -m venv /app/venv
|
|
ENV PATH="/app/venv/bin:$PATH"
|
|
|
|
# ADDED: Uninstall old fhirpath just in case it's in requirements.txt
|
|
RUN pip uninstall -y fhirpath || true
|
|
# ADDED: Install the new fhirpathpy library
|
|
RUN pip install --no-cache-dir fhirpathpy
|
|
|
|
# Copy Flask files
|
|
COPY requirements.txt .
|
|
# Install requirements (including Pydantic - check version compatibility if needed)
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
COPY app.py .
|
|
COPY services.py .
|
|
COPY forms.py .
|
|
COPY package.py .
|
|
COPY templates/ templates/
|
|
COPY static/ static/
|
|
COPY tests/ tests/
|
|
|
|
# Ensure /tmp, /app/h2-data, /app/static/uploads, and /app/logs are writable
|
|
RUN mkdir -p /tmp /app/h2-data /app/static/uploads /app/logs && chmod 777 /tmp /app/h2-data /app/static/uploads /app/logs
|
|
|
|
# Copy pre-built Candle DLL files
|
|
COPY fhir-candle/publish/ /app/fhir-candle-publish/
|
|
|
|
# Install supervisord
|
|
RUN pip install supervisor
|
|
|
|
# Configure supervisord
|
|
COPY supervisord.conf /etc/supervisord.conf
|
|
|
|
# Expose ports
|
|
EXPOSE 5000 5001
|
|
|
|
# Start supervisord
|
|
CMD ["supervisord", "-c", "/etc/supervisord.conf"]
|