Skip to content
Snippets Groups Projects
Dockerfile 802 B
Newer Older
Erik Reid's avatar
Erik Reid committed
FROM python:3.11

ARG ARTIFACT_VERSION

RUN pip install \
    --pre \
    --extra-index-url https://artifactory.software.geant.org/artifactory/api/pypi/geant-swd-pypi/simple \
    geant-service-orchestrator==${ARTIFACT_VERSION}

Neda Moeini's avatar
Neda Moeini committed
# Create the directory for the configuration and copy the example config into it
# NOTE: a real config must be mounted at /etc/gso/config.json when running the container
Neda Moeini's avatar
Neda Moeini committed
RUN mkdir -p /etc/gso
COPY gso/oss-params-example.json /etc/gso/config.json

# Expose port 8080 for the FastAPI application
Neda Moeini's avatar
Neda Moeini committed
EXPOSE 8080

# The app reads the configuration from this location.
# No need to set environment variables in your docker-compose.
Neda Moeini's avatar
Neda Moeini committed
ENV OSS_PARAMS_FILENAME=/etc/gso/config.json

# Start the FastAPI application
CMD ["uvicorn", "gso.main:app", "--host", "0.0.0.0", "--port", "8080"]