From 9abd17897042c0476b71434bdbe42d1f8423a5f0 Mon Sep 17 00:00:00 2001 From: etiti Date: Fri, 7 Feb 2025 08:55:47 +0300 Subject: [PATCH] update govtool docker file --- Dockerfile.govtool | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Dockerfile.govtool b/Dockerfile.govtool index 652ceb0..a5ef9be 100644 --- a/Dockerfile.govtool +++ b/Dockerfile.govtool @@ -14,7 +14,17 @@ WORKDIR /app/govtool/frontend RUN yarn install -COPY ./ui/dist /app/govtool/frontend/node_modules/@intersect.mbo/govtool-outcomes-pillar-ui/dist +COPY ./ui/dist /app/govtool/frontend/ui/dist + +# Conditionally install the package or copy UI files +RUN if [ "$CARDANO_NETWORK" = "mainnet" ]; then \ + echo "Installing latest @intersect.mbo/govtool-outcomes-pillar-ui via yarn..."; \ + yarn cache clean; \ + yarn add @intersect.mbo/govtool-outcomes-pillar-ui@latest; \ + else \ + echo "Copying UI files for non-mainnet environment..."; \ + cp -r /app/govtool/frontend/ui/dist /app/govtool/frontend/node_modules/@intersect.mbo/govtool-outcomes-pillar-ui/dist; \ + fi # Copy environment variables and build the project RUN cp .env.example .env