diff --git a/Dockerfile-service b/Dockerfile-service new file mode 100644 index 0000000..04f09c3 --- /dev/null +++ b/Dockerfile-service @@ -0,0 +1,23 @@ +# Use an official Python base image +FROM python:3.11 + +# Set working directory +WORKDIR /app + +# Install Poetry +RUN curl -sSL https://install.python-poetry.org | python3 - +ENV PATH="${PATH}:/root/.local/bin" +RUN poetry config virtualenvs.create false + +COPY . /app + +# Install dependencies +RUN poetry install + +# Copy the rest of the application + +# Expose the port Streamlit uses +EXPOSE 8501 + +# Run the application +CMD ["poetry", "run", "streamlit", "run", "service_catalog/🏠_Home_Page.py"] \ No newline at end of file diff --git a/docker-compose.override.yml b/docker-compose.override.yml index cf46556..ab8cb5a 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -1,4 +1,11 @@ --- +x-service-catalog: &service-catalog + image: opsmill/poc-service-catalog:${INFRAHUB_BASE_VERSION:-1.2.11} + build: + context: . + dockerfile: Dockerfile-service + ports: + - 8501:8501 x-infrahub-custom-build: &infrahub_custom_build image: opsmill/poc-service-catalog:${INFRAHUB_BASE_VERSION:-1.2.11} build: @@ -8,9 +15,16 @@ x-infrahub-custom-build: &infrahub_custom_build INFRAHUB_BASE_VERSION: "${INFRAHUB_BASE_VERSION:-1.2.11}" services: + service-catalog: + <<: *service-catalog + environment: + INFRAHUB_ADDRESS: http://infrahub-server:8000 + INFRAHUB_API_TOKEN: 44af444d-3b26-410d-9546-b758657e026c + depends_on: + - infrahub-server infrahub-server: <<: *infrahub_custom_build task-worker: <<: *infrahub_custom_build task-manager: - <<: *infrahub_custom_build + <<: *infrahub_custom_build \ No newline at end of file