49 lines
2 KiB
Text
49 lines
2 KiB
Text
# syntax=docker/dockerfile:1.7
|
|
|
|
FROM oven/bun:1.3.11
|
|
|
|
WORKDIR /app
|
|
|
|
ENV NODE_ENV=production
|
|
ENV VIRTUAL_ENV=/opt/ingest-options-venv
|
|
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
|
|
|
|
COPY --from=workspace package.json ./package.json
|
|
COPY --from=workspace bun.lock ./bun.lock
|
|
COPY --from=workspace tsconfig.base.json ./tsconfig.base.json
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends python3 python3-pip python3-venv \
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
&& python3 -m venv "${VIRTUAL_ENV}"
|
|
|
|
COPY --from=apps desktop/package.json ./apps/desktop/package.json
|
|
COPY --from=apps web/package.json ./apps/web/package.json
|
|
|
|
COPY --from=packages bus/package.json ./packages/bus/package.json
|
|
COPY --from=packages config/package.json ./packages/config/package.json
|
|
COPY --from=packages observability/package.json ./packages/observability/package.json
|
|
COPY --from=packages storage/package.json ./packages/storage/package.json
|
|
COPY --from=packages types/package.json ./packages/types/package.json
|
|
|
|
COPY --from=services api/package.json ./services/api/package.json
|
|
COPY --from=services candles/package.json ./services/candles/package.json
|
|
COPY --from=services compute/package.json ./services/compute/package.json
|
|
COPY --from=services eod-enricher/package.json ./services/eod-enricher/package.json
|
|
COPY --from=services ingest-equities/package.json ./services/ingest-equities/package.json
|
|
COPY --from=services ingest-options/package.json ./services/ingest-options/package.json
|
|
COPY --from=services ingest-options/py/requirements.txt ./services/ingest-options/py/requirements.txt
|
|
COPY --from=services refdata/package.json ./services/refdata/package.json
|
|
COPY --from=services replay/package.json ./services/replay/package.json
|
|
|
|
RUN --mount=type=cache,target=/root/.cache/pip \
|
|
"${VIRTUAL_ENV}/bin/pip" install -r services/ingest-options/py/requirements.txt
|
|
|
|
RUN --mount=type=cache,target=/root/.bun/install/cache \
|
|
bun install --frozen-lockfile
|
|
|
|
COPY --from=services . ./services
|
|
COPY --from=packages . ./packages
|
|
COPY --from=apps . ./apps
|
|
|
|
ENTRYPOINT ["bun"]
|